locked
Jquery toggle div disappearing after postback and also need plus and minus symbol to open and close RRS feed

  • Question

  • User-471420332 posted

    I have set of Toggle slide every slide contains a checkbox list and it have relation to next slide like country, State and city and after click check box list then the page is post back then slider is disappearing. I need slide to be open after post back and also need plus and minus symbol to open and close.

    Below is my script code:

    function pageLoad(sender, args) {
            $(function () {
                jQuery(document).ready(function ($) {
                    $("DIV.Content").hide('slow');
                    $("DIV.collapsePanelHeader").click(function () {
                        $(this).parent().children("DIV.Content").slideToggle(500);
    
                    });
                });
    
            });
        }

    Below is my html code:

    <div id="header" class="collapsePanelHeader">
    <div id="dvHeaderText" class="HeaderContent"> Country Origin</div>
    </div>             
    
     <div id="dvASPNET2" class="Content" style="display: none">
      <asp:CheckBoxList ID="chkblst_CountryOrigin" runat="server" CssClass="chkbox" AutoPostBack="true" OnSelectedIndexChanged="chkblst_CountryOrigin_SelectedIndexChanged">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:myConnectionString %>"
       SelectCommand="select CountryId,Country  from Table_LKP_Country "> </asp:SqlDataSource>
    
     </div>
    Saturday, April 30, 2016 12:55 PM

Answers

All replies