Ok here is the problem
$(window).load(function () {
\\Do something
});
and other variations of this just don't work in chrom and safri. FF,IE opera work fine I search but didn't find any working solution someone know how to check in chrome,safari when the page has finished loading?
You can try one of the below code if you want to execute something on page load.
$(document).ready(function(){
//Page loaded
});
OR
$(function(){
//Page loaded
});
EDIT: Try this
window.onload = function(){
//Page loaded
};
Or if you want to use jQuery then try this
$(window).bind('load', function(){
//Page loaded
});
Both window.load
and document.ready
work for me, here's a fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With