Home › Forums › JavaScript › Responsive menu: toggle adds inline styles › Reply To: Responsive menu: toggle adds inline styles
April 2, 2016 at 4:45 am
#240124
Shikkediel
Participant
A way to avoid many resize events being fired would be to use a debounce function. Although in practice, only web devs resizing the browser window will make this occur. The function to be executed is also minimal so I can’t imagine a machine that would have trouble with it.
I’ve found that $(window).width()
is utterly cross browser reliable by the way.