jquery幻灯片切换为表单复选框 [英] jquery slide toggle as a form checkbox
本文介绍了jquery幻灯片切换为表单复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何使用类似这样的Jquery Slide切换作为表单中的复选框?
How would I go about using something like this Jquery Slide toggle as a checkbox in a form?
非常感谢。 :)
推荐答案
在这个例子中,显示复选框: http://jsfiddle.net/skimberk1/TUPG7/
Here you go, this example show the checkbox: http://jsfiddle.net/skimberk1/TUPG7/
在此示例中,它隐藏了: http://jsfiddle.net/skimberk1/KNHu7/
And in this example, it's hidden: http://jsfiddle.net/skimberk1/KNHu7/
它的工作原理是,它检测是否一个复选框直接在切换后,如果有,它隐藏它,并检查/取消选中它,当你滑动切换。
The way it works is that it detects if theres a checkbox directly after the toggle, and if there is, it hides it and checks/unchecks it when you slide the toggle.
这篇关于jquery幻灯片切换为表单复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文