Skip to content

Instantly share code, notes, and snippets.

@davidsalazar
Created July 8, 2011 20:44
Show Gist options
  • Save davidsalazar/1072763 to your computer and use it in GitHub Desktop.
Save davidsalazar/1072763 to your computer and use it in GitHub Desktop.
Element ready.
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