Arh Hokagi
Arh Hokagi

Reputation: 298

create dynamic node with jstree methode

I have been struggling with problem this for hours I have successfully created a folder tree with jstree. But I couldn't append new folders dynamically to it, here is the link to the create_node method

http://www.jstree.com/api/#/?q=(&f=create_node([obj, node, pos, callback, is_loaded])

My Implementation :

var parentid = 6 // just an example
$('#folderTree').jstree().create_node(parentid , 'new node' );

please help

Upvotes: 1

Views: 1519

Answers (1)

Arh Hokagi
Arh Hokagi

Reputation: 298

I figured out the solution

I must set 'check_callback' : true, otherwise all operations like create, rename... are prevented.

Upvotes: 2

Related Questions