$(window).on('load', function() { // code here });
$(document).ready(function() { // Code to run as soon as the page is ready })