Created
July 8, 2011 20:44
-
-
Save davidsalazar/1072763 to your computer and use it in GitHub Desktop.
Element ready.
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
element_ready: function(id, callback, interval) { | |
var interval = interval ? interval : 100; | |
var check = setInterval(function() { | |
if (document.getElementById(id)) | |
{ | |
clearInterval(check); | |
callback(); | |
} | |
}, interval); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment