Skip to content

Instantly share code, notes, and snippets.

@tistaharahap
Created September 18, 2011 13:28
Show Gist options
  • Save tistaharahap/1225071 to your computer and use it in GitHub Desktop.
Save tistaharahap/1225071 to your computer and use it in GitHub Desktop.
Blackberry Webworks - Execute JavaScript after UI rendering is Complete
var ready = self.setInterval("checkReady()", 100);
function checkReady() {
var root = document.getElementById("root"); // Change this to any HTML element
if(typeof root != 'undefined') {
window.clearInterval(ready);
__init();
}
}
function __init() {
// Your codes here..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment