Normal toggle : toggle « jQuery « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
                
                $("p").click(function () {
                    $("p").toggle("normal");
                });
        });
    </script>
  </head>
  <body>
    <body>
        <p>Hello</p>
    </body>
</html>








30.106.toggle
30.106.1.Click to toggle style
30.106.2.Toggle true and false
30.106.3.Slow toggle
30.106.4.Normal toggle
30.106.5.Toggle fast
30.106.6.Toggle in milliseconds
30.106.7.Toggle among two or more function calls every other click
30.106.8.Use toggle function to change class
30.106.9.Click to toggle opacity
30.106.10.toggle(fn, fn1): when clicking matched element, the first specified function is fired, clicked again, the second is fired.