There is a layer:
<div style="position: absolute; left: 10px; top: 10px;" onClick="isMove(this)">Лол</div>
There is a script:
<script type="text/javascript"> function isMove(element) { for(t=0;t<10;t++){ setTimeout('actMove('+element+')', t*100); } } function actMove(element) { element.style.left=parseInt(element.style.left)+1+'px'; element.style.top=parseInt(element.style.top)+1+'px'; } </script>
In fact, everything should work, this is passed normally to the first function, but the second one does not start.
PS if you change
setTimeout('actMove('+element+')', t*100);
on
actMove(element);
then everything works, but of course the situation changes instantly. How can I fix it?