Click here to Skip to main content
14,298,693 members
Rate this:
Please Sign up or sign in to vote.
For the first time jstree is loaded but if i callback jstree through js ,then it is not loaded.

What I have tried:

var PGroupdata = JSON.parse(newStr)


      $('#data').jstree({
          'core': {
              'data': PGroupdata
          }
      });


$('#data').jstree(true).select_node('2');
Posted
Updated 3-Sep-19 21:21pm
v3

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I would say that your jsTree script is loaded after your code. Try to initialize it on the page load:

$(function () { 
      $('#data').jstree({
          'core': {
              'data': PGroupdata
          }
      });
}
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100