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

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -