title: How to redirect to a specific tab using jquery
body: <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    &lt;script&gt;   $(function() {
             $( "#tabs" ).tabs();   });   
      &lt;/script&gt;</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>    &lt;div id="tabs"&gt;
         &lt;ul&gt;
             &lt;li&gt;&lt;a href="#tabs-1"&gt;tab1&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#tabs-2"&gt;tab2&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#tabs-3"&gt;tab3&lt;/a&gt;&lt;/li&gt;   
        &lt;/ul&gt; 
        
      &lt;div id="tabs-1"&gt;   
      &lt;/div&gt;   
      &lt;div id="tabs-2"&gt;   
      &lt;/div&gt;   
      &lt;div id="tabs-3"&gt;   
      &lt;/div&gt;
  
      &lt;/div&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="tabs"&gt;
         &lt;ul&gt;
             &lt;li&gt;&lt;a href="#tabs-1"&gt;Reg&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#tabs-2"&gt;Summery&lt;/a&gt;&lt;/li&gt;
             &lt;li&gt;&lt;a href="#tabs-3"&gt;Advanced Search&lt;/a&gt;&lt;/li&gt;   
        &lt;/ul&gt; 
        
  &lt;div id="tabs-1"&gt;   
  &lt;/div&gt;   
  &lt;div id="tabs-2"&gt;   
  &lt;/div&gt;   
  &lt;div id="tabs-3"&gt;
    &lt;table style="width: 100%;"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      Company:
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;asp:DropDownList ID="ddlCompanies" runat="server" CssClass="dropdown" Width="250px"&gt;
                                      &lt;/asp:DropDownList&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      &amp;nbsp;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;asp:Button ID="btnSearchTotal" runat="server" OnClick="btnSearchTotal_Click" Text="Search"
                                          Width="100px" CssClass="greenbutton" /&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      &amp;nbsp;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &amp;nbsp;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td colspan="2"&gt;
                                      &lt;asp:GridView ID="gdvAuthorize" runat="server" AutoGenerateColumns="False" Width="777px"
                                          OnRowCommand="gdvAuthorize_RowCommand" OnRowEditing="gdvAuthorize_RowEditing"
                                          CssClass="mGrid"&gt;
                                          &lt;Columns&gt;
                                              &lt;asp:BoundField DataField="SlipYear" HeaderText="Slip Year" /&gt;
                                              &lt;asp:BoundField DataField="SlipMonthName" HeaderText="Slip Month" /&gt;
                                              &lt;asp:BoundField DataField="SlipCategoryName" HeaderText="Slip Category Name"&gt;&lt;/asp:BoundField&gt;
                                              &lt;asp:BoundField DataField="TotalCount" HeaderText="Total Count" /&gt;
                                              &lt;asp:ButtonField CommandName="SELECT" ImageUrl="~/images/icon_view.gif" ButtonType="Image"&gt;
                                                  &lt;ItemStyle Width="20px" /&gt;
                                              &lt;/asp:ButtonField&gt;
                                              &lt;asp:TemplateField HeaderText="SlipMonthID" Visible="False"&gt;
                                                  &lt;ItemTemplate&gt;
                                                      &lt;asp:Label ID="SlipMonth" runat="server" Text='&lt;%# Bind("SlipMonth") %&gt;'&gt;&lt;/asp:Label&gt;
                                                  &lt;/ItemTemplate&gt;
                                              &lt;/asp:TemplateField&gt;
                                          &lt;/Columns&gt;
                                      &lt;/asp:GridView&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div id="tabs-2"&gt;
                      &lt;p&gt;
                          &lt;table style="width: 100%;"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      Company:
                                      &lt;td&gt;
                                          &lt;asp:DropDownList ID="ddlCompany" runat="server" CssClass="dropdown" Width="250px"&gt;
                                          &lt;/asp:DropDownList&gt;
                                      &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      Slip Category:
                                      &lt;td&gt;
                                          &lt;asp:DropDownList ID="ddlSlipCategory" runat="server" CssClass="dropdown" Width="125px"&gt;
                                          &lt;/asp:DropDownList&gt;
                                          &lt;asp:Label ID="lblError1" runat="server" ForeColor="Red" Text="Select Category"&gt;&lt;/asp:Label&gt;
                                      &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      Slip Year:
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;asp:DropDownList ID="ddlSlipYear" runat="server" CssClass="dropdown" Width="125px"&gt;
                                      &lt;/asp:DropDownList&gt;
                                      &lt;asp:Label ID="lblError2" runat="server" ForeColor="Red" Text="Select Year"&gt;&lt;/asp:Label&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      Slip Month:
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;asp:DropDownList ID="ddlSlipMonth" runat="server" CssClass="dropdown" Width="125px"&gt;
                                      &lt;/asp:DropDownList&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;
                                      &amp;nbsp;
                                  &lt;/td&gt;
                                  &lt;td&gt;
                                      &lt;asp:Button ID="Button2" runat="server" CssClass="greenbutton" OnClick="btnSearch_Click"
                                          Text="Search" Width="100px" /&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/p&gt;
                  &lt;/div&gt;
  &lt;/table&gt;
  
  &lt;/div&gt;
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the code that I'm currently using for tab function.In tab3 content i'm performing a search function and load search data to a data grid view.But when there is no data from the search function tab will automatically redirect to tab 1,How do I stay remain in tab3 without redirecting to the tab 1?</p>