如何取消选中使用jQuery Uniform库的复选框 [英] How to uncheck checkbox using jQuery Uniform library
本文介绍了如何取消选中使用jQuery Uniform库的复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题,取消选中复选框
。请查看我的jsFiddle ,我在尝试:
$(#check2)。attr(checked,true);
我使用 uniform 复选框
解决方案
查看他们的文档,他们有 $。uniform.update
功能刷新制服的元素。
示例: http://jsfiddle.net/r87NH/4/
$(input:checkbox)。
$(body)。on(click,#check1,function(){
var two = $(#check2)。attr ,this.checked);
$ .uniform.update(two);
});
I have a problem with unchecking a checkbox
. Have a look at my jsFiddle, where I am attempting:
$("#check2").attr("checked", true);
I use uniform for styling the checkbox
and it simply does not work to check/uncheck the checkbox
.
Any ideas?
解决方案
Looking at their docs, they have a $.uniform.update
feature to refresh a "uniformed" element.
Example: http://jsfiddle.net/r87NH/4/
$("input:checkbox").uniform();
$("body").on("click", "#check1", function () {
var two = $("#check2").attr("checked", this.checked);
$.uniform.update(two);
});
这篇关于如何取消选中使用jQuery Uniform库的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文