jquery-sapling icon indicating copy to clipboard operation
jquery-sapling copied to clipboard

feature-expand-a-branch-element

Open joan16v opened this issue 8 years ago • 0 comments

Added the feature to expand only the element you select.

Example of use. Having this list:

<ul id="myList">
    <li>This is first item
        <ul>
            <li id="subItem1">sub item 1</li>
            <li id="subItem2">sub item 2</li>
        </ul>
    </li>
    <li>This is second item
        <ul>
            <li id="subItem3">sub item 3</li>
            <li id="subItem4">sub item 4</li>
        </ul>
    </li>
</ul>

You can only expand the second branch with this:

$('#myList').data('sapling').expandElement('#subItem4');

joan16v avatar Nov 29 '16 13:11 joan16v