首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 这实现了iPhone的风格切换按钮使用Dojo

这实现了iPhone的风格切换按钮使用Dojo

资 源 简 介

iPhone toggle buttons for dojo I decided that I really liked the iPhone toggle button and decided that I wanted to use it on a project. Surprisingly I was only able to find javascript implementations of this button for jQuery and prototype. My favorite library however is Dojo. So I decided to create a Dojo back end with the styles created by Elijah Miller shown here: http://jqr.github.com/2009/08/05/iphone-toggle-switches.html It"s very easy to use this class. After you have imported it either by dojo.require or having all the code on your page you can just run something like this... assuming you have a div with the id container: var button = new hp.iPhoneButton({id:"checkbox",onText:"ON",offText:"OFF",width:200,animateSpeed:200,startOn:false});dojo.place(button.domNode, dojo.byId("container")) All of the constructor args are actually optional. If you leave them all out it creates the default button

文 件 列 表

dojoiphonebutton
images
iphoneButton.html
script
style.css
VIP VIP
0.228611s