var oTil=document.getElementById("title") oTil.onclick=function(){ setTimeout(function(){ this.style.left=i+"px"},300 ) }