Make jquery function run on page load

Load jQuery when the HTML document is loaded:

$(document).ready(function() {
	// business code
});

Load jQuery when all the images on a page have also loaded:

$(window).load(function() {
    // business code
});
Tagged

Leave a Reply