jQuery UI Widgets Forums Navigation Tree Tree and select Methods

This topic contains 4 replies, has 2 voices, and was last updated by  shardik 9 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Tree and select Methods #66432

    shardik
    Participant

    <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);
    }

    • This topic was modified 9 years, 4 months ago by  shardik.
    • This topic was modified 9 years, 4 months ago by  shardik.
    Tree and select Methods #66508

    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Tree and select Methods #66515

    shardik
    Participant

    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

    Tree and select Methods #66577

    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Tree and select Methods #66598

    shardik
    Participant

    merci 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.