Mouse Events

Mouse event in jquery occurs when an action is performed using mouse. Following are the methods used in mouse events.

Click : .click()

The .click() event is used to trigger or bind a function to the click event of the selected element.

Double click : .dblclick()

The .dbclick() event is used to trigger or bind a function to the double click event of the selected element.

Focusin : .focusin()

The .focusin() event is used to bind a function when an element gains focus.

Focusout : focusout()

The .focusout() event is used to bind a function when an element or anyother element inside of it loses focus.

Mouse Hover: .hover(handlerIn(eventObject), handlerOut(eventObject))

The .hover() event is used to combine the actions of both mouseenter and mouseleave.

Mouse over: .mouseover()

The .mouseover() event is used to trigger an action when the mouse is moved over a particular element.

Mouse up: .mouseup(handler(eventObject))

The .mouseup() event is used to perform a function when the mouse pointer pressed up on the element.

Mouse down: .mousedown(handler(eventObject))

The .mousedown() event is used to perform a handler function when the is pressed and not released from the element.Function will be performed without the pointer release from element.

Mouse Enter: .mouseenter(handler(eventObject))

The .mouseenter() event is used to perform a function while the mouse pointer enters the particular element.

Mouse Leave: .mouseleave(handler(eventObject))

The .mouseleave() event is used to perform a function when the mouse pointer is leaving from an element.

Mouse Move: .mousemove()

The mousemove() event is used to trigger an action when the mouse is moved over an element.

Mouse Out: .mouseout()

The .mouseout() event is used to trigger an action when the mouse is moved out of a particular element.

Toggle : .toggle()

The .toggle() event triggers or binds two or more event handler of an specified element in alternate clicks.



Ask Questions

Ask Question