How to Get the Class of the Clicked Element in jQuery?

Posted by Pinki | Updated on

In this example you will learn, how to Get the Class of the Clicked Element in jQuery. You can simply use the event.target property to get the class from any element which is clicked on the document in jQuery. In this solution there is no need to know the element beforehand.


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