I found that using the ui plugin breaks links to tree nodes. This is not new, I found links to this problem elsewhere. The first reason was a problem with the jquery validation plugin v1.6. I do not use this plugin, so this cannot be the reason.
I also found a good post describing several ways to add the jstree-clicked class to the <a> tag. It looked promising, but when I tried it, I didn't notice any difference. Here is a very simple example:
<div id="treediv"> <ul> <li id="page1"><a href="http://www.yahoo.com" class="jstree-clicked">YAHOO!</a></li> </ul> </div> <script type="text/javascript" class="source"> $(function () { $("#treediv") .jstree({ "core" : { "animation" : 0 }, "themes" : { "theme" : "classic" }, "plugins" : [ "themes", "html_data", "cookies", "ui" ] }); }); </script>
If I pulled out the ui plugin, then clicking the link will lead me to yahoo.com, as expected. Does anyone have any idea?
Jeff
source share