This is probably so simple to someone but cant figure it out. I have this code that shows a node in an alert box. How do I add this to the nodes href value ie http://www.example.com/connector/(nodes number). Also there seems to be a prevent default somehere that stops click events. How do I remove that?. Is there a simple way in jquery.
The code I have is below.
$("#demo")
.bind("select_node.jstree", function (event, data) {
var selectedObj = data.rslt.obj;
alert(selectedObj.attr("id") + selectedObj.attr("data"));
This produces the alert with node number.
From the source code I need to add to the href value below.
<li id="node_80" rel="folder" class="jstree-closed"><ins class="jstree-icon"> </ins><a href="#" class="jstree-clicked"><ins class="jstree-icon"> </ins>TEST</a></li>
Maybe something like this: