Streaming live at 10am (PST)

Refresh page when media query breakpoints are triggered


#1

Is there a script to refresh the page when breakpoints are triggered?

I have an on load page animation (for desktop only) and if halfway through it the page is resized by user, the animation is interrupted and the rest of the elements don’t finish loading.


#2

There seems to be plently of alternatives with Javascript.


#3

Thanks Vincent! How do I implement that in webflow?

just javascript:

window.onresize = function(){ location.reload(); }
with jquery:

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

$(window).on('resize',function(){location.reload();});