使用 JQuery EasyUi 树时,我加载了一个带有选中节点的数组。我的 pb 是我的 onCheck 函数在数据加载后触发,我只想在单击复选框时触发该 onCheck 方法
文档说:“当用户单击复选框时触发。” cf: http: //www.jeasyui.com/documentation/tree.php
我不知道我的代码有什么问题。如果您对如何做到这一点有想法,那就太好了:)
这是我的代码:
<script type="text/javascript">
//Enable Drag and drop
$(function(){
$('#tt').tree({
dnd: true,
url: 'get_activite_data.php',
cascadeCheck: true,
onLoadSuccess: function(node,data){
$('#tt').tree('expandAll')
},
onDrop: function(targetNode, source, point){
var targetNode = $('#tt').tree('getNode', targetNode);
.......
}
,
onCheck: function(node,checked){
$.messager.confirm('Confirm','I want to be fire only when user click manually the checkbox', function(r){...});
}
});
});