This question is locked. New answers and comments are not allowed.
I'm using this script to check only visible children
This only works for the level directly beneath the parent. I'd like to check all visible-subchildren (grandchildren, great-grandchildren etc) as well. I'm not quite the jQuery guru yet, so any assistance would be appreciated. Thanks!
function onTreeDataBound(e) { $('#AjaxTreeView').find("li:has(ul)") .find('> div > .t-checkbox :checkbox') .bind('click', function (e) { var isChecked = $(e.target).is(':checked'); var treeView = $($(e.target).closest('.t-treeview')).data('tTreeView'); var checkboxes = $(e.target).closest('.t-item') .find('> ul > li > div:visible > .t-checkbox :checkbox'); $.each(checkboxes, function (index, checkbox) { $(checkbox).attr('checked', isChecked ? true : false); treeView.checkboxClick(e, checkbox); }); });}This only works for the level directly beneath the parent. I'd like to check all visible-subchildren (grandchildren, great-grandchildren etc) as well. I'm not quite the jQuery guru yet, so any assistance would be appreciated. Thanks!