You can add custom properties using HTML with a data attribute (works, although the validator may complain.)
For example, add a new url property:
<ul> <li data="url: 'http://jquery.com'">jQuery home <li data="url: 'http://docs.jquery.com'">jQuery docs
Or when loading from JSON or JS objects:
children: [ { title: "jQuery home", url: "http://jquery.com" }, { title: "jQuery docs", url: "http://docs.jquery.com" },
After that, you can access it like this:
onActivate: function(node) { if( node.data.url ) window.open(node.data.url); $("#echoActive").text(node.data.title); },
EDIT: Since release 1.2 <a> tags are supported based on ( How do I make hyperlinks in the jQuery dynaTree plugin clickable? ).
mar10 source share