各位大佬, 请帮我看看这个问题,
在自定义js 内调用easyui 的 树形菜单, 在给定节点click事件 时,我在自定义方法内部 需要用到 event 对象, 而easyui定义的时候并没有给event对象 只给了node对象 , 我能通过重写 或者什么方法实现 调用到 event对象么?
$('#nav_left_menu').tree({
onClick:function(node){
e.preventDefault();
var target_href = node.attributes.menu_url;
if(!isEmpty(target_href)){
clearTimeout(time);
var time = window.setTimeout(function() {
if (window.location.search) {
window.location.href = window.location.href.replace(window.location.search, '').replace(window.location.hash, '') + '#' + target_href;
} else {
window.location.hash = target_href;
}
}, 100);
}
$(window).on('hashchange', function() {
loadURL(node);
});
},
onDblClick:function(node){
$(this).tree(node.state === 'closed' ? 'expand' : 'collapse', node.target);
node.state = node.state === 'closed' ? 'open' : 'closed';
}
})