Javascript examples for jQuery Method and Property:mouseup
trigger the mouseup event for the selected elements:
<!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>