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

Is it possible to use jquery to make ajax request? : jquery mobile

0 Answers  


Explain the difference between $(this) and 'this' in jquery?

0 Answers  


What is jquery selectors? Give some examples.

0 Answers  


Can we select a element having a specific class in jquery ?

0 Answers  


Define url paremeter of jquery ajax method?

0 Answers  


How jQuery selectors are executed?

1 Answers  


What is the latest version of jquery?

0 Answers  


How do you get the text value of a selected option?

0 Answers  


What are selectors in jquery?

0 Answers  


Why is not dom ready working for jquery mobile? : jquery mobile

0 Answers  


Explain jquery.noconflict? : jquery mobile

0 Answers  


How do you add an HTML element in DOM tree?

0 Answers  


Categories