title: how to disabled accordion tab?
body: <p>i want disabled shipping tab.when it will open means if i fill all details in billing information tab without an error like email validation, required fields etc..once i filled all correct values then click shipping information tab then only open.otherwise i dont want open shipping tab.it should be disabled.
   see picture:
     <a href="https://i.stack.imgur.com/ZfKbq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZfKbq.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;div id="accordion-container accordion-header_Static " class="checkout-accordion"&gt;
     &lt;h2 id="h2login" class="accordion-header"&gt;Login&lt;/h2&gt;
     &lt;h2 id="h2BillingInformatio" class="accordion-header accordion-header_Static"&gt;Billing Information&lt;/h2&gt;
     &lt;div id="divBillingInformatio" class="accordion-content"&gt;
        &lt;div class="row"&gt;
           &lt;div class="col-md-6"&gt;
              &lt;label&gt;First Name &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtFirstName" onkeyup="chkSameAs_OnCheckChanged()" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" Text=""
                 SetFocusOnError="true" ControlToValidate="txtFirstName" ValidationGroup="Bill"
                 CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;/div&gt;
           &lt;div class="col-md-6"&gt;
              &lt;label&gt;Last Name &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtLastName" onkeyup="chkSameAs_OnCheckChanged()" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" Text=""
                 SetFocusOnError="true" ControlToValidate="txtLastName" ValidationGroup="Bill"
                 CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;/div&gt;
        &lt;/div&gt;
        &lt;label&gt;Company Name&lt;/label&gt;
        &lt;asp:TextBox ID="txtCompany" runat="server" onkeyup="chkSameAs_OnCheckChanged()" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
        &lt;label&gt;Address &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;asp:TextBox ID="txtAddressLine1" onkeyup="chkSameAs_OnCheckChanged()" runat="server" placeholder="Street Address" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
        &lt;asp:RequiredFieldValidator ID="rfvAddressLine1" runat="server" Text=""
           SetFocusOnError="true" ControlToValidate="txtAddressLine1" ValidationGroup="Bill"
           CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;asp:TextBox ID="txtAddressLine2" onkeyup="chkSameAs_OnCheckChanged()" runat="server" ClientIDMode="Static" placeholder="Apartment, suite, unit, etc. (if applicable)"&gt;&lt;/asp:TextBox&gt;
        &lt;div class="row"&gt;
           &lt;div class="col-md-6"&gt;
              &lt;label&gt;City &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtCity" onkeyup="chkSameAs_OnCheckChanged()" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="rfvCity" runat="server" Text="City is required" ControlToValidate="txtCity"
                 SetFocusOnError="true" ValidationGroup="Bill" CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;/div&gt;
           &lt;div class="col-md-3"&gt;
              &lt;asp:UpdatePanel ID="upCountry" runat="server" UpdateMode="Conditional"&gt;
                 &lt;ContentTemplate&gt;
                    &lt;div id="pStateFields" runat="server" visible="true"&gt;
                       &lt;label&gt;State&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                       &lt;asp:DropDownList ID="ddlState" onchange="chkSameAs_OnCheckChanged()" ClientIDMode="Static" CssClass="select" runat="server" DataTextField="Name" DataValueField="StateRowId" ForeColor="#000"&gt;
                       &lt;/asp:DropDownList&gt;
                       &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text=""
                          SetFocusOnError="true" ControlToValidate="ddlState" ValidationGroup="Bill"
                          InitialValue="" CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
                       &lt;br /&gt;
                    &lt;/div&gt;
                 &lt;/ContentTemplate&gt;
              &lt;/asp:UpdatePanel&gt;
           &lt;/div&gt;
           &lt;div class="col-md-3"&gt;
              &lt;label&gt;Zip &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtZip" onkeyup="chkSameAs_OnCheckChanged()" onkeypress="return OnlyNumber(event,this.id);" runat="server" CssClass="inputTxt" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="rfvZip" runat="server" Text="Zip is required" ControlToValidate="txtZip"
                 SetFocusOnError="true" ValidationGroup="Bill" CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Text="ZipCode must be numeric"
                 SetFocusOnError="true" ControlToValidate="txtZip" ValidationGroup="Bill" CssClass="QtyError"
                 Display="Dynamic" ValidationExpression="^\d*$"&gt;&lt;/asp:RegularExpressionValidator&gt;
              &lt;br /&gt;
           &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="row"&gt;
           &lt;div class="col-md-6"&gt;
              &lt;label&gt;Email &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtEmail" onkeyup="chkSameAs_OnCheckChanged()" runat="server" CssClass="inputTxt" ClientIDMode="Static" autocomplete="off"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="rfvEmail" runat="server" Text=""
                 SetFocusOnError="true" ControlToValidate="txtEmail" ValidationGroup="Bill"
                 CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;asp:RegularExpressionValidator ID="revEmail" runat="server" Text="Email is in invalid format"
                 SetFocusOnError="true" ControlToValidate="txtEmail" ValidationGroup="Bill"
                 Display="Dynamic" CssClass="QtyError" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"&gt;&lt;/asp:RegularExpressionValidator&gt;
           &lt;/div&gt;
           &lt;div class="col-md-6"&gt;
              &lt;label&gt;Phone &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;asp:TextBox ID="txtPhone" onkeyup="chkSameAs_OnCheckChanged()" runat="server" CssClass="inputTxt" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:RequiredFieldValidator ID="rfvPhone" runat="server" Text=""
                 SetFocusOnError="true" ControlToValidate="txtPhone" ValidationGroup="Bill"
                 CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
     &lt;h2 id="h2ShippingInformatio" class="accordion-header accordion-header_Static" onclick="shippingTab();"&gt;Shipping Information&lt;/h2&gt;
     &lt;div id="divShippingInformatio" class="accordion-content second-row"&gt;
        &lt;%--&lt;input id="ShippingCheck" type="checkbox" checked onclick="chkSameAs_OnCheckChanged()" /&gt;--%&gt;
        &lt;asp:CheckBox ID="ShippingCheck" runat="server" ClientIDMode="Static" onclick="chkSameAs_OnCheckChanged()" /&gt;
        &lt;asp:HiddenField ID="hfchkShippingCheck" runat="server" ClientIDMode="Static" /&gt;
        &lt;label&gt;&amp;nbsp;Same as Billing Address&lt;/label&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;fieldset id="ShippingForm" disabled runat="server" clientidmode="static"&gt;
           &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                 &lt;label&gt;First Name &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtshipInfoFirstName" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtshipInfoFirstName" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;/div&gt;
              &lt;div class="col-md-6"&gt;
                 &lt;label&gt;Last Name &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtshipInfoLastName" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtshipInfoLastName" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;/div&gt;
           &lt;/div&gt;
           &lt;label&gt;Company Name&lt;/label&gt;
           &lt;asp:TextBox ID="txtShipInfoCompany" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
           &lt;label&gt;Address &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
           &lt;asp:TextBox ID="txtshipInfoAddressLine1" runat="server" ClientIDMode="Static" placeholder="Street Address"&gt;&lt;/asp:TextBox&gt;
           &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Text=""
              SetFocusOnError="true" ControlToValidate="txtshipInfoAddressLine1" ValidationGroup="Ship"
              CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
           &lt;asp:TextBox ID="txtshipInfoAddressLine2" runat="server" ClientIDMode="Static" placeholder="Apartment, suite, unit, etc. (if applicable)"&gt;&lt;/asp:TextBox&gt;
           &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                 &lt;label&gt;City &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtshipInfoCity" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtshipInfoCity" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3"&gt;
                 &lt;label&gt;State&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:UpdatePanel ID="upShipInfoCountry" runat="server" UpdateMode="Conditional"&gt;
                    &lt;ContentTemplate&gt;
                       &lt;div id="p1" runat="server" visible="true"&gt;
                          &lt;asp:DropDownList ID="ddlShipInfoState" ClientIDMode="Static" CssClass="select" runat="server" DataTextField="Name" DataValueField="StateRowId" ForeColor="#000"&gt;
                          &lt;/asp:DropDownList&gt;
                          &lt;asp:RequiredFieldValidator ID="rfvddlShipInfoState" runat="server" Text=""
                             SetFocusOnError="true" ControlToValidate="ddlShipInfoState" ValidationGroup="Ship"
                             InitialValue="" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;br /&gt;
                       &lt;/div&gt;
                    &lt;/ContentTemplate&gt;
                 &lt;/asp:UpdatePanel&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3"&gt;
                 &lt;label&gt;Zip &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtShipInfoZip" runat="server" ClientIDMode="Static" onchange="StateTaxBind()" onkeypress="return OnlyNumber(event,this.id);"&gt;&lt;/asp:TextBox&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtShipInfoZip" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
                 &lt;asp:RegularExpressionValidator ID="revQuantity" runat="server" Text="ZipCode must be numeric"
                    SetFocusOnError="true" ControlToValidate="txtShipInfoZip" ValidationGroup="Ship" CssClass="QtyError"
                    Display="Dynamic" ValidationExpression="^\d*$"&gt;&lt;/asp:RegularExpressionValidator&gt;
              &lt;/div&gt;
           &lt;/div&gt;
           &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                 &lt;label&gt;Email &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtShipInfoEmail" runat="server" ClientIDMode="Static" onkeyup="errortxtShipInfoEmails()"&gt;&lt;/asp:TextBox&gt;
                 &lt;span id="errortxtShipInfoEmail" class="QtyError" style="display: none"&gt;&lt;/span&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtShipInfoEmail" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
                 &lt;%--asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Text="Email is in invalid format"
                    SetFocusOnError="true" ControlToValidate="txtShipInfoEmail" ValidationGroup="Ship"
                    Display="Dynamic" CssClass="QtyError" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"&gt;&lt;/%--asp:RegularExpressionValidator&gt;--%&gt;
                 &lt;asp:RegularExpressionValidator ID="rgvdfd" runat="server" ControlToValidate="txtShipInfoEmail" Text="email is in invalid format" CssClass="QtyError" ValidationGroup="Ship" SetFocusOnError="true" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"&gt; &lt;/asp:RegularExpressionValidator&gt;
              &lt;/div&gt;
              &lt;div class="col-md-6"&gt;
                 &lt;label&gt;Phone &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
                 &lt;asp:TextBox ID="txtShipInfoPhone" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
                 &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" Text=""
                    SetFocusOnError="true" ControlToValidate="txtShipInfoPhone" ValidationGroup="Ship"
                    CssClass="QtyError" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;
              &lt;/div&gt;
           &lt;/div&gt;
        &lt;/fieldset&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Jquery:</p>
  
  <pre><code>$('.accordion-header').toggleClass('inactive-header');
  
  Open The First Accordion Section When Page Loads
  $('.accordion-header').first().toggleClass('active-header').toggleClass('inactive-header');
  $('.accordion-content').first().slideDown().toggleClass('open-content');
  
  // The Accordion Effect
  $('.accordion-header').on('click', function () {
      if ($(this).is('.inactive-header')) {
          $('.active-header').toggleClass('active-header').toggleClass('inactive-header').next().slideToggle().toggleClass('open-content');
          $(this).toggleClass('active-header').toggleClass('inactive-header');
          $(this).next().slideToggle().toggleClass('open-content');
          //alert('0');
      }
  
      else {
          $(this).toggleClass('active-header').toggleClass('inactive-header');
          $(this).next().slideToggle().toggleClass('open-content');
          //alert('1');
      }
  });
  </code></pre>