javascript - jQuery - compatibility issue with Firefox -


at moment, learning how write in javascript , jquery. however, wrote simple jquery code if resize window page automatically refreshed. working on chrome, ie, edge, opera not in mozilla firefox. can check code , tell me wrong , why doesn't work firefox. grateful , thank in advance.

$(document).ready(function() {     $(window).resize(function(){location.reload(true);}); }); 

best regards,

george s.

try calling function outside of $(document).ready

if doesn't work try window.location.href=window.location.href; instead of location.reload(true);

$(document).ready( function () {     // nothing in here });  $(window).resize(yourfunction);   function yourfunction(){       location.reload(true);  } 

or

$(window).resize( function () {     location.reload(true); }); 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -