Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Responsive menu: toggle adds inline styles Reply To: Responsive menu: toggle adds inline styles

#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.