Hi, I need that the "div#animacao" move for other place in page, but in slow speed ... I already make this code: //js code function moveDiv(){ var end = 600; var objTarget = document.getElementById('animacao'); for( var i = 0; i <= end; i++) { var path = objTarget.style.height= i + 'px'; setTimeout(path, 9000); } } window.onload = function() { setTimeout(moveDiv, 900); } Code (markup): <!--html code--> <style type="text/css"> body { background-color:#FF6600; color:#FFFFFF; } #animacao{ width:300px; height:300px; background-color:#333; position:absolute; } </style> </head> <body> <div id="animacao"></div> </body> </html> HTML: help me please ...
function moveDiv(){ var stopAt = 600; var object = document.getElementById('animacao'); var current = parseInt(object.style.height); if( current < stopAt ){ object.style.height = parseInt(object.style.height) + 1; setTimeout("moveDiv()",900); } } window.onload = function() { moveDiv(); } Code (markup): see if that breaks lemme know if any errors
Thanks for help, but not work ... The Div don't move ... I test in Firefox, IE, Safari and Opera. Don't word in none ... What it can be happening?
Thanks for help, but not work ... The Div don't move ... I test in Firefox, IE, Safari and Opera. Don't work in none ... What it can be happening?[/QUOTE]