Closed vorbe closed 8 years ago
I thought about this while developing the plugin but let's face it, how often do you resize your browser? Except when testing a plugin's performance, of course. I think throttling will have a negligible impact for any user.
With that being said, your point is still valid but just not an immediate concern.
After some testing, turns out I was wrong. On Chrome in Android, when you scroll down, the nav bar hides. While it's hiding, it fires the resize event.
This has been taken care of.
Now I need to make sure the kebab icon doesn't move to a new line.
$(window).on('load.okayNav resize.okayNav', function(event) { _okayNav.recalcNav(); console.log('resized'); }); I logged this part here to see what was happening when the browser was resizing (and the nav was changing/ recalculating ) , it seems maybe little excessive and could be throttled or reduced a little?
I'm not 100% sure how badly this would affect real world performance (it seems pretty good at the moment) or if it would add unnecessary weight to the js.
Side note: I'm not a developer at all, more a curious designer..