Run function when the left, middle or right mouse button is released over the HTML element - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:mouseup

Description

Run function when the left, middle or right mouse button is released over the HTML element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#p1").mouseup(function(){
        console.log("Mouse up over p1!");
    });/*from  www .j a  v  a 2  s  .co  m*/
});
</script>
</head>
<body>

<p id="p1">This is a paragraph.</p>

</body>
</html>

Related Tutorials