jstree - stop single expanded node from collapsing
up vote
2
down vote
favorite
Using jstree is it possible to block the collapse of a single specific node?
I have a tree structure which can be expanded/collapsed at will... but I have certain nodes that should always be open and not allow the user to collapse them.
Is there a way to block the collapse (maybe through the data-jstree
attribute on the <li>
)... and if possible, a way to also remove the triangle against the item?
I've tried hooking into the close_node.jstree
event but neither using a return false
or e.preventDefault()
is stopping it happening.
In the following example, I want the "Item 2 - Must Keep Open" to ALWAYS be open, and not allow the user to hide the "Always Visible" item...
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
javascript jquery tree jstree
add a comment |
up vote
2
down vote
favorite
Using jstree is it possible to block the collapse of a single specific node?
I have a tree structure which can be expanded/collapsed at will... but I have certain nodes that should always be open and not allow the user to collapse them.
Is there a way to block the collapse (maybe through the data-jstree
attribute on the <li>
)... and if possible, a way to also remove the triangle against the item?
I've tried hooking into the close_node.jstree
event but neither using a return false
or e.preventDefault()
is stopping it happening.
In the following example, I want the "Item 2 - Must Keep Open" to ALWAYS be open, and not allow the user to hide the "Always Visible" item...
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
javascript jquery tree jstree
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Using jstree is it possible to block the collapse of a single specific node?
I have a tree structure which can be expanded/collapsed at will... but I have certain nodes that should always be open and not allow the user to collapse them.
Is there a way to block the collapse (maybe through the data-jstree
attribute on the <li>
)... and if possible, a way to also remove the triangle against the item?
I've tried hooking into the close_node.jstree
event but neither using a return false
or e.preventDefault()
is stopping it happening.
In the following example, I want the "Item 2 - Must Keep Open" to ALWAYS be open, and not allow the user to hide the "Always Visible" item...
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
javascript jquery tree jstree
Using jstree is it possible to block the collapse of a single specific node?
I have a tree structure which can be expanded/collapsed at will... but I have certain nodes that should always be open and not allow the user to collapse them.
Is there a way to block the collapse (maybe through the data-jstree
attribute on the <li>
)... and if possible, a way to also remove the triangle against the item?
I've tried hooking into the close_node.jstree
event but neither using a return false
or e.preventDefault()
is stopping it happening.
In the following example, I want the "Item 2 - Must Keep Open" to ALWAYS be open, and not allow the user to hide the "Always Visible" item...
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
$(function() {
$("#treeRoot").jstree({
core: {
themes: {
variant: "small"
}
}
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<li data-jstree='{"opened":true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
javascript jquery tree jstree
javascript jquery tree jstree
asked yesterday
freefaller
13k53866
13k53866
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I couldn't find any option for preventing the closing of the node besides the option of overriding the close_node
function of the jstree code.
Here is an example:
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
I didn't have the time to handle with the triangle, let me know if you have issues there, I'll try to find a solution for this one as well.
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.
– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
|
show 7 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I couldn't find any option for preventing the closing of the node besides the option of overriding the close_node
function of the jstree code.
Here is an example:
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
I didn't have the time to handle with the triangle, let me know if you have issues there, I'll try to find a solution for this one as well.
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.
– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
|
show 7 more comments
up vote
1
down vote
accepted
I couldn't find any option for preventing the closing of the node besides the option of overriding the close_node
function of the jstree code.
Here is an example:
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
I didn't have the time to handle with the triangle, let me know if you have issues there, I'll try to find a solution for this one as well.
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.
– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
|
show 7 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I couldn't find any option for preventing the closing of the node besides the option of overriding the close_node
function of the jstree code.
Here is an example:
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
I didn't have the time to handle with the triangle, let me know if you have issues there, I'll try to find a solution for this one as well.
I couldn't find any option for preventing the closing of the node besides the option of overriding the close_node
function of the jstree code.
Here is an example:
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
I didn't have the time to handle with the triangle, let me know if you have issues there, I'll try to find a solution for this one as well.
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
$(function() {
$.jstree.core.prototype.old_close_node = $.jstree.core.prototype.close_node;
$.jstree.core.prototype.close_node = function(obj, animation) {
node_obj = this.get_node(obj);
// in case the flag exists - don't continue to with the original function.
if (node_obj.state.prevent_close) {
return;
}
this.old_close_node(obj, animation);
}
$("#treeRoot").on('loaded.jstree', function() {
$('#treeRoot li').each((index, el) => {
if ($(el).data('jstree') && $(el).data('jstree').prevent_close) {
$(el).addClass('prevent-close');
}
})
}).jstree({
core: {
themes: {
variant: "small"
}
}
})
});
.jstree-default-small .jstree-open.prevent-close>.jstree-ocl {
background-position: -71px -7px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<div id="treeRoot">
<ul>
<li data-jstree='{"opened":true}'>Root
<ul>
<li>Item 1</li>
<!-- v-- this is the flag to prevent the close -->
<li data-jstree='{"opened":true, "prevent_close": true}'>Item 2 - Must keep open
<ul>
<li>Always Visible</li>
</ul>
</li>
<li>Item 3</li>
</ul>
</li>
</ul>
</div>
edited yesterday
answered yesterday
Dekel
41.7k44567
41.7k44567
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.
– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
|
show 7 more comments
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.
– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
Thanks for your time Dekel... is your code supposed to stop the collapse, or demonstrate how to override the close functionality?
– freefaller
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
both, actually :) try to click on the "root" element (to close it).
– Dekel
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Ah, that's something I hadn't tried... as it's the "Item 2 - Must keep open" that I'm trying to block the closure of. Every parent-node should act as normal
– freefaller
yesterday
Just add the
"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.– Dekel
yesterday
Just add the
"prevent_close": true
where you need it... I changed the code to set the prevent_close on the second element. check it now.– Dekel
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
Interesting... many thanks for the idea. Never keen on overriding functionality, in case the underlying functionality changes in future updates. Will have a play and let you know how I get on. If you do figure out removing the triangle, please let me know
– freefaller
yesterday
|
show 7 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53265854%2fjstree-stop-single-expanded-node-from-collapsing%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password