expanded

The expanded() method accepts two types of options.
1. An optional Boolean value, specifying whether the item identified should be expanded or collapsed.
2. A variable list of numeric values (zero-based indexes), specifying the context menu level. For example, an argument list of (true, 3, 2) specifies that the fourth element from the first context menu and the 3rd from the secondary sub menu.
If the first element is omitted, then the state of the specified index (expanded or collapsed) is returned.


<ul id="contextmenu1">
    <li>Open</li>
	<li>Options</li>
        <ul>
            <li>Save</li>
            <li>Save As</li>
        </ul>
</ul>
<button id="button1" type="button">Context Menu</button>

<script type="text/javascript">

            $("#contextmenu1").shieldContextMenu({
                target: "body"               
            });

            $("#button1").click(function handleMenu() {                
                $("#contextmenu1").swidget().visible(true);
                //Options context menu item gets expanded
                $("#contextmenu1").swidget().expanded(false, 1);                
            });
</script>