How to use mouseup() Method Event in jQuery

This article describe about mouseup() Method Event in jQuery.
  • 2534

The mouseup() Method Event in jQuery

When mouse pointer released over the selected element then mouseup event occur.

The mouseup event only require to button released unlike the click event. Generate trigger when mouse pointer over the element and button released.

The mouseup() method triggers the mouseup event, it is also define what will happens when mouseup event occurs.

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

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

            $("p").slideToggle();

        });

    });

</script>

</head>

<body>

<p>This is my first paragraph.</p>

<button>Toggle</button>

</body>

</html>

 

Output

 

mouseup method pic54.jpg

 

The mouseup Event trigger

Generate trigger of mouseup event for selected element.

Syntax

$(selector).mouseup()

 

Bind a Function to the mouseup Event

It is define a function to run when mouseup event trigger for selected element.

 

Syntax

 

$(selector).mouseup(function)

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.