Syntax

Basic Example

In the jQuery code listed above, the click() method specifies that a function should run when the click event occurs. In the example below, the div element will be hidden once it is clicked.