javascript - Why does jQuery.ready run when the page isnt ready? -


so put jquery document ready functions @ bottom of html, have run before elements of page loaded. i'm tired of functions not working because resources arent finished loading on page, jquery.ready keeps saying elements done loading when arent! wants set 300ms timeout functions wait little after jquery.ready?

use .ready() perform actions when dom ready scripting.

$(document).ready(function(){ }); 

use .load() perform actions when "page" (resources including files , images) loaded.

$(window).load(function(){ }); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -