-
-
Save Najki/5d005278752b4744f8b47049673da872 to your computer and use it in GitHub Desktop.
Paul Irish's better setInterval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* From Paul Irish */ | |
/* instead of */ | |
setInterval(function(){ doAsyncStuff(); },100); | |
/* use anonymous self-executing async function */ | |
(function thisismyfunctionuniquename () { | |
$("#update").load("mypage.aspx",function () { | |
setTimeout(thisismyfunctionuniquename, 100); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment