How to determine if a page has been fully rendered using jQuery?

When using $(document).ready(functioon(){alert("Loaded.")}); a pop-up window appears with the words "Downloaded". even before , the page is fully loaded (in other words, it is still loading, like images).

Any thoughts?

+7
source share
4 answers
 $(window).on('load', function() { //everything is loaded });
$(window).on('load', function() { //everything is loaded }); 
+13
source

Try instead .load ().

 $(document).load(function () { alert('Loaded'); } 

A load event is dispatched to an element when it and all sub-elements have been fully loaded. http://api.jquery.com/load-event/

+4
source

Using javascript

  window.onload = function () { alert("loaded"); } 
0
source
0
source

All Articles