Loading Pages with jQuery
I tried wrapping my script in every type of “$(document).ready(function()” I could think of even trying “(“#id-thats-loaded”).ready(function()”. Finally I learned that “(document).ready(function()” only fires when HTML is loaded and DOM is ready.
And using a “$(window).load(function()” fires when the complete page is fully loaded. After I wrapped the script in the “$(window).load(function(),” the page loaded correctly.