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
There is another event which is fired later. it's $(window).load(); This is fired after all resources are loaded.
But perhaps you want this:
function loadWindowSystem(){
// load window system here
}
$(document).ready(function(){
// do some html stuff here
loadWindowSystem();
})
This way you can separate your code in functions.