Dynatree will remove the <a> tags by default, so it may be easier to implement the onActivate handler:
onActivate: function(node) { if( node.data.href ){ // use href and target attributes: window.location.href = node.data.href; // window.open(node.data.href, node.data.target); // $("#div").load(node.data.href); } }
Starting with version 1.1.2, Dynatree will use the href and target attributes directly from the <a> tag:
<li id="x"><a href="b">Child node 1-2</a></li>
In older versions, you should install href as follows:
<li id="x" data="href: 'b'"><a href="b">Child node 1-2</a></li>
source share