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

Explain various methods to make ajax request in jquery? : jquery mobile

0 Answers  


Tell me do I need to add the jquery file both at the master page and content page as well?

0 Answers  


Explain type paremeter of jquery ajax method?

0 Answers  


What is jquery.holdready() function?

0 Answers  


Mention the differences between javascript and jquery.

0 Answers  


Explain the animate function.

0 Answers  


How we can hide a block of html code on a button click using jquery?

0 Answers  


What is difference between onload and ready?

0 Answers  


What are the different ways of using $.connect function in jquery?

0 Answers  


How can events be prevented to work after an ajax request?

0 Answers  


How do you select an item using css class or id and get the value by use of jquery.

0 Answers  


What is $('div')? : jquery mobile

0 Answers  


Categories