How to check if an element exists in jQuery?

Posted by Ramesh Singh | Updated on

In this example, we have shared how to check if an element exists in jQuery? Use the jQuery .length property to determine whether an element exists or not in case if you want to fire some event only if a particular element exists in HTML DOM.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers