Yetimwork Beyene
Yetimwork Beyene

Reputation: 2337

jstree create_node event is not firing but able to create the node?

I'm able to create the node but the event is not firing. No errors reported in firefox. What I'm doing wrong...

     $("#treeFile1").jstree("create", null, "outside", { "attr" : { "rel" : "folder" }}).bind("create.jstree", function(event,data)
                    {
                            alert("hello");
                    });

As I mention, the node (folder) is created with no problems. The event is not firing....

Upvotes: 1

Views: 2050

Answers (1)

Yetimwork Beyene
Yetimwork Beyene

Reputation: 2337

Connect the bind to the tree container directly, like this:

   $("#treeFile1").bind("create.jstree", function(event,data)
   {
            alert("hello");
   });

Upvotes: 2

Related Questions