我创建了一个树结构(Dynatree)。这是 fiddel ,它也不是在 fiddel 中工作可能是一些外部链接问题。但它在我的系统中工作正常。
http://jsfiddle.net/raghavendram040/032Lp7s2/
我的问题是当我刷新浏览器时它会记住我之前选择的节点,我想禁用它。为此,我确实喜欢这样做。
$(function(){
$("#tree").dynatree({
persist: true,
ajaxDefaults: { // Used by initAjax option
cache: false, // false: Append random '_' argument to the request url to prevent caching.
dataType: "json" // Expect json format and pass json object to callbacks.
},
onActivate: function(node) {
$("#echoActivated").text(node.data.title + ", key=" + node.data.key);
temp=node.data.key;
},
onClick: function(node, event) {
// Close menu on click
if( $(".contextMenu:visible").length > 0 ){
$(".contextMenu").hide();
//return false;
}
},
});
但它不起作用,任何人都可以帮助我吗?