Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James Hildeman 92 posts 88 karma points
    Mar 28, 2013 @ 22:32
    James Hildeman
    0

    How to get JTree to open node?

    Umbraco: v4.11.3.1

    I would like to automatically open a node in the tree on the left (id=JTree).  It appears that I can just set a class of "open" or "closed" (at least as I test it through firebug).  I tried the following jQuery in the ready block of TreeControl.ascx:

       jQuery("#JTree ul li ul li").removeClass("closed").addClass("open");    // #fail

    Testing further I found the following (jquery test) works fine, until I get down below the JTree element and then it fails on everything after that:

        jQuery("body #uiArea #JTree").addClass("ncaatourney");            // #works

        jQuery("body #uiArea #JTree ul").addClass("ncaatourney");        // #fail

    From this I can conclude that jquery is there and working.  I am navigating down the tree correctly with jquery selectors.  All I can think is that may it is some kind of a timing thing where the jQuery.UmbracoTree isn't done loading yet??? 

    All of the above code is in the ready block of /Umbraco/Controls/Tree/TreeControl.ascx.  Any help would be much appreciated.

    Thanks,

    James J

    P.S. Is there any documentation on JTree?  I am using v4.11.3.1 and can't seem to find much info about TreeControl.ascx or JTree.

Please Sign in or register to post replies

Write your reply to:

Draft