Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery mouseup() method

jQuery mouseup() method

jQuery event methods jQuery event methods

Example

in

element, insert some text:

$("div").mouseup(function(){

    $(this).after("Mouse button released.");

});

Try it »


Definition and Usage

The mouseup event occurs when the mouse pointer moves over an element and the left mouse button is released.

The mouseup() method triggers the mouseup event, or adds a function to run when a mouseup event occurs.

**Tip:** This method is usually used together with mousedown() the method.


Syntax

Trigger the mouseup event of the selected element:

$(

selector

).mouseup()

Try it

Add a function to the mouseup event:

$(

selector

).mouseup(

function

)

Try it

Parameters Description
function Optional. Specifies the function to run when the mouseup event is triggered.

jQuery event methods jQuery event methods