set this Jquery code into body onload - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:fadeToggle

Description

set this Jquery code into body onload

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() {/*from   ww  w.  j av  a2s .  com*/
    $("#div1").fadeToggle();
    $("#div2").fadeToggle("slow");
    $("#div3").fadeToggle(3000);
}

      </script>  
   </body>
</html>

Related Tutorials