Mouse toggle event handler.
.toggle() method is used to bind two or more event handlers to the matched set that are executed cyclically on mouse clicks.
toggleevent is exactly the same as binding the
.click()event to the specified element when only one handler is specified.
- Use the
.click()method if you only want to handle a single click.
- Use the
.dblclick()method if you only want to handle timed double clicks.
- There is also an animation method named .toggle() and the method that is fired depends on the set of arguments passed.
This method was deprecated in jQuery 1.8 and removed in jQuery 1.9 so we are just showing it for completeness.
|Bind two or more event handlers to the matched set that are executed on alternate mouse clicks.|
|A function to execute when the mouse pointer is clicked on the element the first time.
|A function to execute when the mouse pointer is clicked on the element the Nth time.|