jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Tree › Tree and select Methods
This topic contains 4 replies, has 2 voices, and was last updated by shardik 10 years, 2 months ago.
-
AuthorTree and select Methods Posts
-
<div id=’jqxTree’>
-
<li item-selected=’true’>Home
<li item-expanded=’true’>Solutions- Education
- Financial services
- Government
- Manufacturing
- Solutions
- Consumer photo and video
- Mobile
- Rich Internet applications
- Technical communication
- Training and eLearning
- Web conferencing
- All industries and solutions
</div>
<div id=”test” style=”display:none;”>wait</div>
$(‘#jqxTree’).jqxTree({
height: ‘300px’,
width: ‘300px’,
theme: ‘energyblue’
});
$(‘#jqxTree’).on(‘select’, function (event) {
$(‘#test’).show();
var args = event.args;
var item = $(‘#jqxTree’).jqxTree(‘getItem’, args.element);
var label = item.label;
uty_sleep(5000)});
function uty_sleep(delay) {
var start = new Date().getTime();
while (new Date().getTime() < start + delay);
}Hello shardik,
What exactly is your question or the issue you experience? Please specify this and repost your code and format it by selecting it and clicking on the
code
button in the toolbar.Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I’ve simulate my problem, at the select on tree I need to show quickly the wait message
<div id='jqxTree'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'>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>Web conferencing</li> </ul> </li> <li>All industries and solutions</li> </ul> </li> </ul> </div> <div id='test' style='display:none;'>wait</div>
$('#jqxTree').jqxTree({ height: '300px', width: '300px', theme: 'energyblue' }); $('#jqxTree').on('select', function (event) { $("#test").show(); uty_sleep(5000) }); function uty_sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() < start + delay); }
I’ve try with the click, but work after the select
can I help me?Shardik
Hi Shardik,
Please try the following:
$('#jqxTree').on('select', function (event) { $("#test").show(function () { uty_sleep(5000) }); });
Please also check the demo Load on Demand with Ajax. It might be helpful to you.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/merci
-
AuthorPosts
You must be logged in to reply to this topic.