3 ms·
It depends on the type of application you're building, and what your market is. This is a perfectly valid technique for iOS and likely Android web apps, and for
by geuis 16y ago
It depends on the type of application you're building, and what your market is. This is a perfectly valid technique for iOS and likely Android web apps, and for modern browsers capable of supporting it.
- alanh 16y agoI 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.)
- silvestrov 16y agoIt works in Firefox 3.6 (without animations) and Firefox 4.0b8 (with animations).