jsTree test
How-to videos for Poles ‘n’ Wires version 7
- Pole Strength module
- Databases
- Profile module
- General
$(function () {
// 6 create an instance when the DOM is ready
$(‘#jstree’).jstree({
“plugins” : [ “wholerow” ]
,
“core” : {
“multiple” : false,
“animation” : 0 }
});
// 7 bind to events triggered on the tree
$(‘#jstree’)
.on(“changed.jstree”, function (e, data) {console.log(data.selected);})
.on(“select_node.jstree”, function (e, data) {window.location = data.instance.get_node(data.node, true).children(‘a’).attr(‘href’); });
// 8 interact with the tree – either way is OK
$(‘button’).on(‘click’, function () {
$(‘#jstree’).jstree(true).select_node(‘child_node_1’);
$(‘#jstree’).jstree(‘select_node’, ‘child_node_1’);
$.jstree.reference(‘#jstree’).select_node(‘child_node_1’);
});
});
These videos are available on our youtube channel..