metronic/jquery uniform使用中checkbox渲染问题
2016-04-27 10:03
423 查看
设定checkbox选中状态后,需要手工刷新
function chooseAll() {
if ($("#chkAll").checked) {
$("input[name='itemIds']").each(function() {
$(this).prop('checked',true);
});
} else {
$('input[name="itemIds"]').each(function() {
$(this).prop('checked',false);
});
}
var set = $(this).attr("data-set");
var checked = $(this).is(":checked");
$(set).each(function () {
if (checked) {
$(this).attr("checked", true);
} else {
$(this).attr("checked", false);
}
});
$.uniform.update(set);
}
function chooseAll() {
if ($("#chkAll").checked) {
$("input[name='itemIds']").each(function() {
$(this).prop('checked',true);
});
} else {
$('input[name="itemIds"]').each(function() {
$(this).prop('checked',false);
});
}
var set = $(this).attr("data-set");
var checked = $(this).is(":checked");
$(set).each(function () {
if (checked) {
$(this).attr("checked", true);
} else {
$(this).attr("checked", false);
}
});
$.uniform.update(set);
}
相关文章推荐
- jquery中each遍历对象和数组示例
- jQuery遍历对象、数组、集合实例
- jQuery 选择器
- 浅析jQuery事件之on()方法绑定多个选择器,多个事件
- 浅析jquery与checkbox的checked属性的问题
- 【摘】jQueryMobile开发问题记录
- jQueryMobile在开发中的知识总结
- jQuery顾虑器——类过滤
- 那些你经常会用的Jquery语法
- jQuery笔记
- Jquery实现的Tabs标签页简洁版
- 图片突出显示(jquery)
- 图片轮播(jquery方式)
- jquery_easyUI 键盘弹起事件
- jQuery事件绑定on()、bind()与delegate() 方法详解
- jquery [datatable]排序时指定某列不可排序
- jquery submit()不能提交表单的解决方法
- JQuery点击隐藏行或者列
- jquery dataTable参数
- jQuery AJAX Call for posting data to ASP.Net page ( not Get but POST)