Javascript examples for jQuery Method and Property:toggle
Fade to toggle() with parameter
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> </head> <body onload="myFunction()"> <h1>Hello World!</h1> <script> function myFunction() {// w ww.ja v a 2 s .c om $("#div1").fadeToggle(); $("#div2").fadeToggle("slow"); $("#div3").fadeToggle(3000); } </script> </body> </html>