jQuery $(window).on('load', function() {... in Firefox

David ReederBy David Reeder, 09 September 2024

I have been having trouble getting the window on load method to work in Firefox, probably because in my site.js file they are inside a document.ready function:

 $(window).on('load', function(){ ...

So replace:

$(window).on('load resize', function() {
        getWinHeight();
        getWinWidth();
});

with:

getWinHeight();
getWinWidth();
$(window).on('resize', function() {
        getWinHeight();
         getWinWidth();
 });

 

 


Back