jQuery click() With Example

jQuery click() method fires on clicking an HTML element. This method will attach an event handler to the click event. We can do desired manipulations on the selected HTML element using this event handler.

jQuery click

jQuery click() event syntax:

Here click() method is used without an argument.

The handler could be any function that is executed each time the event is fired.

jQuery Click Example

Following example demonstrates the use of jQuery click() method.

In this example, you can see that click() method is triggered while clicking on the <div> element. In this method, we pass a handler to do the sliding transition and changing HTML text of the selected <div> element. The slideUp() method executes each time when the click event is fired.

jQuery click demo

You can see above example in action by visiting below link.
jQuery Click Event Demo

By admin

Leave a Reply

%d bloggers like this: