var rotateOne = function() { window.alert("first"); }; window.setTimeout(rotateOne, 3000);