Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



precisely! 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/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: