6 ms·
> The main critique I have for the OP is that is that it should be responsive -- and only work on tablets and mobile All it does is add and remove classes. It
by gabemart 12y ago
> The main critique I have for the OP is that is that it should be responsive -- and only work on tablets and mobile
All it does is add and remove classes. It can be as responsive or unresponsive as you like with @media rules.
- WickyNilliams 12y agoprecisely! or you can use matchMedia (or my lib enquire.js [0]) to selectively enable/disable the entire feature. This might be preferable than @media in your CSS, because it does away with scroll listeners where they're not needed. [0] http://wicky.nillia.ms/enquire.js/ http://wicky.nillia.ms/enquire.js/