Document ready
$( document ).ready(function() {
//whatever
});
// Shorthand for $( document ).ready()
$(function() {
//whatever
});
//window load
$(window).load(function() {
// executes when complete page is fully loaded, including all frames, objects and images
alert("window is loaded");
});