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 8156327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:54:58+00:00 2026-06-06T16:54:58+00:00

This is regarding the jsTree jQuery plugin . I’ve been struggling with this for

  • 0

This is regarding the jsTree jQuery plugin. I’ve been struggling with this for a while now only to realise it’s
not (natively) possible to do, so I thought about the following solution to my problem below (which doesn’t work).

I have a tree that uses the json_data plugin with ajax. Once you open
a specific node the result from the server is an array of over 1000
json nodes. The response is pretty fast but the rendering itself takes
a while (the user experience is that he gets the annoying “script not
responding – stop script / continue” message.

The solution I thought about was limiting the results sent back from
the server to a smaller number (say 200) and using some “show more”
label (or using the jQuery scroll event) to fetch the next 200.
However, using the jstree.create on each of those nodes appears to be
very slow.
I then noticed this thread on the jsTree google group
in which Ivan suggest it’s possible to create all nodes at once using
the parse_json function – this doesn’t work for me.

A short code snippet of what I’m trying to do:
(when clicking the “show more” label):

$.ajax({
   // send data to server in order to get the relevant json back
   }(),
   success : function (r) {
           var parent_node = data.inst._get_parent(data.rslt.obj);
           var id = parent_node.attr("id");
           $("#root_tree").jstree("_parse_json", r, parent_node );
           $("#root_tree").jstree("clean_node", parent_node, false);
           }
   });

The above example doesn’t render the json and adds the children to the
parent node.

I would highly appreciate any other approach or if anyone could point
out what am I doing wrong.
Again, using:

$.each(r, function(i, node) {
       var id = parent_node.attr("id");
       $("#root_tree").jstree("create", "#"+id, "last", node, false, true);
});

Does work, but very very slowly (slower than rendering all 1000 nodes
together).

Thanks

  • 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-06T16:55:00+00:00Added an answer on June 6, 2026 at 4:55 pm

    Ok, so my usage was a bit off.

    What I ended up doing, was calling the function on the tree view instead of listening to the event:

     var ref = parent_node.attr("id");
     $.each(data, function(i, jsonNode) {
           var node = inst._parse_json(jsonNode);
           node.insertInside(ref);
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is regarding the following jQuery plugin: http://blog.danawoodman.com/jquery-showhide/ I am using jQuery show hide
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')
My question is regarding this post Is it possible to set an animated gif
I was searching on web regarding this but could not find any relevant answer.
It seems that all questions regarding this topic are very specific, and while I
I've searched SO regarding this question, and the only information is regarding Python 2.6.
This is regarding jquery FullCalendar. I want to access an event object loaded into
(this is regarding the Ramaze.net framework) I ran into some really strange problems while
This is regarding a project that concerns detection of text in an image using
This is regarding AES algorithm. Suppose i have implemented a AES algorithm and encrypt

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.