Javascript examples for jQuery Method and Property:toggle
JavaScript function to hide/unhide panel
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> <script type="text/javascript"> $(window).load(function(){/* www. j ava2 s. co m*/ $('input[type=button]').click(function() { var mypanel = $('#my'); mypanel.toggle(); }); }); </script> </head> <body> <span id="my"> Some controls </span> <input type="button" value="Hide/Unhide"> </body> </html>