Easyui tree方法扩展getImperfectCheck

$.extend($.fn.tree.methods, {
getImperfectCheck : function (jq) {
var checked = jq.find("span.tree-checkbox1");
var nodes = [];
for (var i = 0; i < checked.length; i++) {
var node = $(checked[i]).parent();
nodes.push(node.data('treeNode'));
var children = node.next('ul');
if (children.length > 0) {
i += children.find("span.tree-checkbox1").length;
}
}
return nodes;
}
});

posted @ 2016-09-23 09:50  芜明-追星  阅读(176)  评论(0编辑  收藏  举报