jsTree – loading subnodes via ajax on demand

Irishka pointed me in the right direction, but does not fully resolve my problem. I fiddled around with her answer and came up with this. Using two different server functions is done only for clarity. The first one lists all products at top level, the second one lists all children of a given productid: jQuery(“#introspection_tree”).jstree({ … Read more

How to select a specific node programmatically?

Just wanted to chime in here as none of the answers worked for me. What finally DID work was very simple: $(‘#someTree’).jstree(‘select_node’, ‘someNodeId’); Note that I didn’t initialize someNodeId as a jQuery object. It’s just a plain string. I did this right after a tree was loaded without putting it into a “ready” bind event … Read more

How do I open all nodes in jquery Jstree?

The jsTree documentation is “sub optimal”. The docs don’t clearly state that the initialization works asynchronously. There’s core.loaded(): A dummy function, whose purpose is only to trigger the loaded event. This event is triggered once after the tree’s root nodes are loaded, but before any nodes set in initially_open are opened. This suggests an event … Read more

Configuring jstree right-click contextmenu for different node types

The contextmenu plugin already has support for this. From the documentation you linked to: items: Expects an object or a function, which should return an object. If a function is used it fired in the tree’s context and receives one argument – the node that was right clicked. So rather than give contextmenu a hard-coded … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)