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

I disagree for reasons of maintainability and code weight. A web toggle button is about 5 lines of CSS, 10 of JavaScript, and 2 of HTML (in my experience). A toggle button that requires minutes of investigation to grok is not really appropriate for anything useful that someone else may maintain or fork.

Edit: You’re right as far as browser support if you only want to target Webkit and bleeding-edge browsers, but that’s not really my point. (And I’m not sure why you would want to actively exclude other browsers by choosing a complicated technique instead of a more traditional, lightweight, and understandable one — which is my point.)



It works in Firefox 3.6 (without animations) and Firefox 4.0b8 (with animations).




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: