Loading…

How we can check if an element is empty or not using Jquery?

You can check it in various ways.

if ($('#element').is(':empty')){
   //write your code here
}

OR

if ( $('#element').text().length == 0 ) {
   // length is 0
}

Suggest An Answer

Our Particitants

if($(#element).is(:empty)){

alert(

Latest post from JQuery interview questions

Ask Question