$(document).ready() executes the code when all HTML elements have been loaded.
$(document).ready()
How to execute jQuery code after all of the CSS rules have been applied?<
$(window).load() fires after the whole page (images, CSS, etc.) has loaded.
$(window).load()