next button of jquery tab not working
<p>I am using jQuery tab and on next button I want it to move to the next tab</p>

<pre><code>    $(".next-tab").click(function () {
       var selected = $("#tab-div").Tabs("option", "selected");
       alert(selected);
    $("#tab-div").Tabs("option", "selected", selected + 1);
    });


    &lt;div id="tab-div"&gt;
    &lt;ul class="nav"&gt;
    &lt;li&gt;&lt;a href="#tab1" class="current"&gt;New Group&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#tab2"&gt;For Companies&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div class="list-wrap"&gt;
    &lt;div id="tab1" class=""&gt;
    &lt;table width="70%" border="0" cellspacing="0" cellpadding="5" class="alltbls creatgrp"&gt;
    &lt;tr&gt;
    &lt;td width="239" class="td-left req"&gt;Group Name&lt;/td&gt;
    &lt;td&gt; &lt;asp:TextBox ID="txtGroupName" class="text" runat="server" TabIndex="1" onchange="ontextchange()"&gt;&lt;/asp:TextBox&gt;  &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

    &lt;/div&gt;
    &lt;div id="tab2" class=""&gt;
        &lt;table width="70%" border="0" cellspacing="0" cellpadding="5" class="alltbls creatgrp"&gt;
        &lt;tr&gt;
            &lt;td width="239" class="td-left req"&gt;Group Name&lt;/td&gt;
            &lt;td&gt; &lt;asp:TextBox ID="txtGroupName" class="text" runat="server" TabIndex="1" onchange="ontextchange()"&gt;&lt;/asp:TextBox&gt;  &lt;/td&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
    &lt;/div&gt;
</code></pre>

<p>On alert I am getting object object instead of the tab index.</p>

<p>Thanks,   </p>
