I have lots of HTML generated on $(document).ready()
. I have a simple window system. But not only it is generated on $(document).ready()
- also som
I usually don't advocate using setTimeout
, but you can build on top of @jfriend00's answer to create a more abstract approach:
$(document).ready(function() {
setTimeout(function() {
$(document).trigger('afterready');
}, 1);
});
$(document).bind('afterready', function() {
// call your code here that you want to run after all $(document).ready() calls have run
});