如何使用切换按钮而不是复选框/单选按钮? [英] How to use toggle buttons instead of checkboxes/radio buttons?
本文介绍了如何使用切换按钮而不是复选框/单选按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
希望这会有所帮助。 检查出来!
< $ p $ $('。Switch')。click(function(){$ b $($。$)$> $(document).ready(function(){
//开关切换$ b $ $ b $(this).toggleClass('On')。toggleClass('Off');
});
});
How to use ON/OFF switches instead of Checkboxes and Radio buttons as shown in image to beautify website design.
解决方案
Hope this helps. Check it out!
$(document).ready(function() {
// Switch toggle
$('.Switch').click(function() {
$(this).toggleClass('On').toggleClass('Off');
});
});
这篇关于如何使用切换按钮而不是复选框/单选按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文