am i eight that this is a good way to make sure the page only show when everything is loaded? (also images etc)?
(given that #main is the div holding al the content...)
actually i m talking about the events, ready event is fired after load event has done, so if you simply omit $(window).load(function() and leave it as follows, it will work fine too
ah maybe i'm mis informed, but willing to learn.
here is where i got some info:
The window load event executes a bit later (after document ready) when the complete page is fully loaded, including all frames, objects and images. Therefore functions which concern images or other page contents should be placed in the load event for the window or the content tag itself.
$(document).ready() is fired when DOM is ready and not all content loaded. It usefull in most cases when developer just want to manipulate DOM, window.load should be your solution
Bookmarks