.toggle()    ** REMOVED **S2C Home « Events « .toggle()

Mouse toggle event handler.

Description

The .toggle() method is used to bind two or more event handlers to the matched set that are executed cyclically on mouse clicks.

  • The toggle event 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.

This method was deprecated in jQuery 1.8 and removed in jQuery 1.9 so we are just showing it for completeness.

Syntax

Signature Description
.mouseup( )Trigger the mouseup JavaScript event on the specified element.
.mouseup( [eventData ,] handler(eventObject) )Bind an event handler to the mouseup JavaScript event, optionally passing an object of data.

Parameters

Parameter Description Type
handler1(eventObject)A function to execute when the mouse pointer is clicked on the element the first time.
  • This is the same as binding the .click() event to the function when no other handlers are specified.
Function
handlerN(eventObject)A function to execute when the mouse pointer is clicked on the element the Nth time.Function

Return

A jQuery object.