YouTip LogoYouTip

Event Click

# jQuery click() Method [![Image 3: jQuery Event Methods](#) jQuery Event Methods](#) ## Example Alert text when clicking the

element: $("p").click(function(){ alert("Paragraph clicked."); }); [Try it Β»](#) * * * ## Definition and Usage The click event occurs when an element is clicked. The click() method triggers the click event, or specifies a function to run when a click event occurs. * * * ## Syntax Trigger the click event for the selected elements: $(_selector_).click() (#) Add a function to the click event: $(_selector_).click(_function_) (#) | Parameter | Description | | :--- | :--- | | _function_ | Optional. Specifies the function to run when the click event occurs. | * * jQuery Event Methods](#)

← Event StopimmediatepropagationEvent Change β†’