Javascript examples for jQuery:Mouse Event
Toggle when a div has been clicked
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script> <script> $(document).ready(function(){ $(".click_me").click(function(){ $(".hideshow").toggle(); });/*from w w w. j a v a 2 s .c o m*/ }); </script> </head> <body> <div class="click_me"> click me </div> <br> <br> <div class="hideshow"> This is a paragraph. </div> </body> </html>