TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Turn your checkboxes into iPhone-style binary switches

61 点作者 r11t超过 15 年前

14 条评论

m_eiman超过 15 年前
Am I the only one who has to think twice every time I see one of those controls; "does the text mean that it's currently off, or does it mean that sliding it over there will turn it off"?
评论 #1078630 未加载
评论 #1078625 未加载
评论 #1079139 未加载
pierrefar超过 15 年前
It's not accessible. In my tests, I attached a label to the checkbox. Clicking the label text doesn't trigger a switch.
ivankirigin超过 15 年前
Tests show standard UI inputs are understood the best. Just use the checkbox for your website.
评论 #1078662 未加载
评论 #1079514 未加载
nakajima超过 15 年前
Ironically, it doesn't work on an iPhone.
评论 #1078588 未加载
评论 #1079163 未加载
jcromartie超过 15 年前
Actually, don't. I can't tab to them and hit space to select them. They take up more room. They break labels. They are ambiguous.
评论 #1079111 未加载
chunkyslink超过 15 年前
If you are interested in a jQuery style plugin see our tutorial we did a few months back which does the same thing<p><a href="http://labs.engageinteractive.co.uk/itoggle/" rel="nofollow">http://labs.engageinteractive.co.uk/itoggle/</a><p>(Should work on your iphone too)
评论 #1078840 未加载
truebosko超过 15 年前
Incase some don't know, jQTouch.com has this functionality, and many other native-looking iPhone effects.<p>I realize the purpose of this one is for non-mobile web browsers, but just putting it out there. ;)
aresant超过 15 年前
Very cool, but absolutely don't use for a functional web-app unless you want to confuse your users.
评论 #1078548 未加载
评论 #1078535 未加载
daleharvey超过 15 年前
I used this for<p><a href="http://pastebin.me/" rel="nofollow">http://pastebin.me/</a><p>slightly confusing, but a checkbox didnt quite work either
评论 #1078877 未加载
评论 #1078911 未加载
评论 #1078845 未加载
Raphael超过 15 年前
Would be cooler if it used CSS transitions.
barmstrong超过 15 年前
Nice work!
gcb超过 15 年前
The only usability advantage over a regular checkbox would be if you could copy and paste the ON or OFF state. but this solution you end up with "option ONOFF" on the clip board.<p>here is my solution, done when he first announced this gadget.<p><a href="http://github.com/gcb/iphone-style-checkboxes" rel="nofollow">http://github.com/gcb/iphone-style-checkboxes</a><p>feel free to fork it and implement his new spify animation.
jorsh超过 15 年前
I was kind of surprised that something so trivial required JQuery or Prototype. Really now?
eru超过 15 年前
It's fun to switch a switch.