javascript - onResize() reloads my webpage causing onResize() to be called again on load again -
i have webpage onresize calls method reloads page submiting form comes same page.
this webpage big , in resizes page or causing onresize event o called again.
what solution stopping infinite loop?
i can't find causing onresize event called , if did don't want change working already.
is there can add on resize method stop going inifite loop
$(window).resize(function(){ refreshmainview(); // submits form redirects same page });
unbind @ first time invoked it:
$(window).resize(function(){ refreshmainview(); // submits form redirects same page // unbind $(window).unbind('resize'); });
Comments
Post a Comment