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
By adding another handler function ones the document is ready, the handler will almost certainly be last one in the ready event queue. Effectively giving you an instant "post" ready handler function.
$(document).ready(function() {
$(document).ready(function() {
// code to run "after" ready
});
});
$(document).ready
When multiple functions are added via successive calls to this method, they run when the DOM is ready in the order in which they are added.
Note that this will only work as long as no ones else uses this "trick".