Hello, I’m trying to perform the following 3 actions with tree item :
1) expand
2) ensure visible
3) select
If item located in sub directory, it’s not scrolled to.
Example :
http://jsfiddle.net/mjytdnb6/
Code :
<div id='jqxTree'>
<ul>
<li>Home</li>
<li>Solutions
<ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>Solutions
<ul>
<li>Consumer photo and video</li>
<li>Mobile</li>
<li>Rich Internet applications</li>
<li>Technical communication</li>
<li>Training and eLearning</li>
<li id="myItem">Web conferencing</li>
</ul>
<li>Education</li>
<li>Financial services</li>
<li>Government</li>
<li>Manufacturing</li>
<li>All industries and solutions</li>
</ul>
</li>
</ul>
</div>
$('#jqxTree').jqxTree({
height: '150px',
width: '300px',
theme: 'energyblue'
});
var element = $("#myItem")[0];
setTimeout(_ => {
$('#jqxTree').jqxTree('expandItem', element);
$('#jqxTree').jqxTree('ensureVisible', element);
$('#jqxTree').jqxTree('selectItem', element);
}, 300);
Thank you