jquery - How i can make this code work without of click on the button? -


http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_animation2

how can make code work without of click on button example when want go 1 page other page writing in box start getting bigger ??

use same code , without click handler

$(document).ready(function(){      // block executed  after dom loaded         var div = $("div");           div.animate({left: '100px'}, "slow");         div.animate({fontsize: '3em'}, "slow");  }); 

or....

  $(document).ready(function(){      settimeout( function startanimation(){      // block executed 1/2 second after dom loaded         var div = $("div");           div.animate({left: '100px'}, "slow");         div.animate({fontsize: '3em'}, "slow");    } ,     500) // time in milliseconds , half second   }); 

use timeout wait couple seconds before execution


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -