trigger the mouseup event for the selected elements: - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:mouseup

Description

trigger the mouseup event for the selected elements:

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(){
    $("button").mouseup(function(){
        $("p").slideToggle();
    });//from ww  w.  j  ava2  s . c o  m
    $("div").mouseover(function(){
        $("button").mouseup();
    });
});
</script>
</head>
<body>

<p>This is a paragraph.</p>

<button>Toggle</button><br><br>

<div>Mouse over this text to trigger the mouseup event here.</div>

</body>
</html>

Related Tutorials