角色授权菜单功能中,点击父节点后子节点联动

This commit is contained in:
Argo-Lenovo 2016-12-11 14:01:12 +08:00
parent b587661b75
commit 1c3abf3fdd
1 changed files with 8 additions and 0 deletions

View File

@ -133,4 +133,12 @@
maxlength: 50
}
});
$nestMenuInput.on('click', ':checkbox', function () {
var val = $(this).prop('checked');
var child = $(this).parent().parent().next();
if (child.hasClass('dd-list')) {
child.find(':checkbox').prop('checked', val);
}
});
});