codingBliss
codingBliss

Reputation: 135

jsTree does not retain node selection after Refresh Event

The jsTree when refreshed does not retain the previous selected Node. When the jsTree is opened and a node is the selected, then on refresh, the jsTree is closed. This is the jsFiddle Example

I had tried with event binding but does not seem to work. Please let me know of a work around.

JS:

$(function () {
    $('#jstree').jstree();
});

function refresh(){
   $("#jstree").jstree("refresh");
}

Upvotes: 1

Views: 3671

Answers (1)

Martin
Martin

Reputation: 123

I have edit your fiddle. Ist this what you want??

Fiddle

$(function () {
$('#jstree').jstree({plugins: ["state"]});
});


function refresh(){
$("#jstree").jstree("refresh");
}

Upvotes: 1

Related Questions