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

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -