click() event method will execute when the user clicks on the HTML DOM element.


<!DOCTYPE html>
        <title>Commonly Used jQuery Event Methods</title>
        <p>If you click on me, I will disappear.</p>
        <p>Click me too!</p>
        <script src=""></script>
            $(document).ready(function() {
                //when you click p element it will disappear
                $("p").click(function() {



The $(document).ready() method allows us to execute a function when the DOM is fully loaded.

Are you facing problems in understanding this article?

Download Source