Called with no arguments, the active() method will return the zero-based index of the currently active tab.

When called with two arguments - active(index, boolActivate) - it can be used to activate or deactivate the given tab.

NOTE: Deactivating a tab will work only if the collapsible property is set to true.

<div id="tabs">
    <div>Tab Pane 1</div> 
    <div>Tab Pane 2</div>

<script type="text/javascript">
    $(function () {

        // select and activate second tab
        $("#tabs").swidget().active(1, true);