Saturday, 24 December 2016

Check div or any tag has html or not

Check div or any tag has html or not


<div id="box3">
   
</div>

$(document).ready(function(){
   if ($("#box3").text().length > 0) {
        console.log('not empty');
   }
   else{
        console.log('empty');
   }                
 });
banner
Previous Post
Next Post

0 comments: