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 the use of the .pushstack() method.

0 Answers  


Explain the use jquery.data method?

0 Answers  


Where jquery mobile works? : jquery mobile

0 Answers  


Can you include multiple version of jQuery? If yes, then how they are executed?

1 Answers  


With jquery which operating system is more compatible?

0 Answers  


How to read cookies in jquery?

0 Answers  


Consider a scenario where things can be done easily with javascript, would you still prefer jQuery?

1 Answers  


Can you call C# code-behind method using jQuery? If yes,then how?

1 Answers  


Which is the starting point of code execution in jQuery?

1 Answers  


Can we use jQuery to make ajax request?

2 Answers  


What are selectors in jquery? Explain

0 Answers  


What does dollar sign ($) means in jquery? : jquery mobile

0 Answers  


Categories