Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:42:08+00:00 2026-06-02T02:42:08+00:00

Using jsTree, when adding a node to my tree using the create_node function, I

  • 0

Using jsTree, when adding a node to my tree using the create_node function, I am attempting to add a callback function, as per https://github.com/vakata/jstree/blob/v.1.0/dist/jstree.js#L3549 .

However, it does not seem to execute, as illustrated here–> http://jsfiddle.net/thapar/e3nMg/ when Add Root Item is clicked (expecting console.log() to say “hi”, in the very least).

Any idea what I may be doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:42:09+00:00Added an answer on June 2, 2026 at 2:42 am

    Per the documentation at http://www.jstree.com/documentation/core, it looks like the ‘callback’ parameter to the .create_node function is used internally. It states that you should instead listen for the event. You can do so like this (assuming you’re using the same code as in your JSFiddle post:

    $('.colors').bind('create_node.jstree', function (e, data) {
       console.log('hi', data.rslt.obj);
    });
    

    ​

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jsTree jQuery plugin for drawing a tree. When user clicks a node,
I am creating a node by using crrm as below $(#TreeDiv).jstree(create, $(#somenode), inside, {
I am using jstree to build a tree menu. When you select an item
I'm using jsTree and I need to convert this HTML tag tree code <ul>
I'm using jsTree 1.0. And have this code : $(document).ready(function () { $(#folders_tree).jstree({ core:
I am using this new jQuery plugin called jsTree www.jstree.com and using the HTML
I am using jstree and several nodes in my tree have the same name.
I am trying to build a tree from an xml file using jstree. I
I am using the latest jstree commit from github with the checkbox plugin as
We are using jsTree for tree representation of the Files and folders. Files and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.