selectedIndex

The selectedIndex() method returns a list of numeric values (zero-based indeces), specifying the selected item menu level.
For example, a return list of [3, 2] specifies that the fourth element from the first menu and the 3rd from the secondary sub menu should is selected.


<ul id="menu1">
    <li>Open</li>
	<li>Save</li>
	<li>Exit</li>
</ul>

<script type="text/javascript">

    $(function () {
        $("#menu1").shieldMenu({
             width: "100px"
        });

        var menu = $("#menu1").swidget();

        //select Save option of the Menu widget
        menu.selected(true, 1);

        //Save option is selected - selectedIndex will return [1]
        var selectedIndex = menu.selectedIndex();
     });

</script>