Fade to toggle() with parameter - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:toggle

Description

Fade to toggle() with parameter

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials