This function is not working with jquery 1.11.1.js
$(function () {
$("[id*=treeviwExample] input[type=checkbox]").bind("click", function (e) {
var table = $(this).closest("table");
if (table.next().length > 0 && table.next()[0].tagName == "DIV") {
//Is Parent CheckBox
var childDiv = table.next();
var isChecked = $(this).is(":checked");
$("input[type=checkbox]", childDiv).each(function () {
if (isChecked) {
$(this).attr("checked", "checked");
} else {
$(this).removeAttr("checked");
}
});
} else {
//Is Child CheckBox
var parentDIV = $(this).closest("DIV");
if ($("input[type=checkbox]", parentDIV).length == $("input[type=checkbox]:checked", parentDIV).length) {
$("input[type=checkbox]", parentDIV.prev()).attr("checked", "checked");
} else {
//$("input[type=checkbox]", parentDIV.prev()).removeAttr("checked");
//$("input[type=checkbox]", superparentDIV.prev()).attr("checked", "checked");
}
}
var superparentDIV = $(this).parents("DIV");
$("input[type=checkbox]", superparentDIV.prev()).attr("checked", "checked");
});
});
It worked in 1..8.3 but I am using 1.11.1.js in my project
please help me