trainingtrains Logo

91-9990449935

 0120-4256464

jQuery mouseup()

The mouseup() method adds an event handler function to an HTML element. This function is executed, when the left mouse button is released after pressing mouse button on the HTML element.

The mouseup () event occurs when you release the pressed button of your mouse over a selected element. Once the mouseup() event is occurred it executes the mouseup() method attached with a function to run.

This event is generally used together with mousedown() event.

Syntax:

It triggers the mouseup event for selected elements.

It adds a function to the mouseup event.

Parameters of jQuery mouseup() event

Parameter Description
Function It is an optional parameter. It executes itself when the mouseup event is triggered.

Example of jQuery mouseup() event

Let's take an example to demonstrate jQuery mouseup() event.

Test it Now

Output:

Enter this heading.


jQuery mouseup() event example 2

Let's see another example of jQuery mouseup() event.

Test it Now

Output:

Press down and release the mouse left button over this div element

Next TopicjQuery mouseover()