Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • JQuery click() method

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 42
    Comment on it

    To assign a click event to all paragraphs we use this method. this is the syntax:

    now, in next step when an event fires, You must pass a function to this event:
    $("p").click(function(){ });


    The $(document).ready() method executes a function when the document is fully loaded.

    The function gets executed when the user clicks on the HTML element.

    <!DOCTYPE html>
    <script src=""></script>
    <p>If you will click it will disappear. </p>
    <p>Click me too!</p>
    <p>and now!</p>

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: