$tree.find('.checkbox').click(function() {
$('.PrefCountryTree .countryLi input:checkbox').each(function() {
checkbox = $(this);
chkBoxName = checkbox.attr('name');
if(chkBoxName.search('chkbox_Region_') >= 0 || chkBoxName.search('chkbox_Country_') >= 0) {
if($(this).attr('checked')) {
//Do Something...
}
}
}
我正在使用jQuery check-tree插件。在這裏,即使我取消它仍然給我複選框結果未捕獲JQuery複選框狀態更改
.is(':checked') = true
,
attr('checked') = checked
,
this.checked = true
。
我需要改變狀態而不是複選框的初始狀態。
我身邊缺少的是什麼?
謝謝比朋,但沒有成功!仍然嘗試 – 2013-03-19 12:43:51
你試過'$ this.is(':checked')'......? – bipen 2013-03-19 12:47:26
是的,我做了,即使在改變事件而不是點擊,但沒有成功 – 2013-03-19 13:52:13