Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you check if an element exists or not in jQuery?



How do you check if an element exists or not in jQuery?..

Answer / chaitanya

Using jQuery length property, we can ensure whether element exists or not.

Hide Copy Code

$(document).ready(function(){

if ($('#element').length > 0){

//Element exists

}

});

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More jQuery Interview Questions

What is the advantage of using protocol less URL while referencing jQuery from CDNs?

1 Answers  


How to use migrate jquery plugin if possible? : jquery mobile

0 Answers  


What is the difference between parent() and parents() methods in jQuery?

1 Answers  


Mention the differences between javascript and jquery.

0 Answers  


What is each() function in jQuery? How do you use it?

0 Answers  


How do I check if the DOM is ready?

0 Answers  


What is the name of jquery method used for an asynchronous http request?

0 Answers  


Tell me is jquery a library for client scripting or server scripting? : jquery mobile

0 Answers  


How can jquery library be added to pages?

0 Answers  


What are the different type of selectors in jquery?

0 Answers  


What are the advantage of using cdn? : jquery mobile

0 Answers  


Tell me how to executed jquery selectors? : jquery mobile

0 Answers  


Categories