Post bock inside a third nested accordion panel will shifts to top 1 child panel

Post bock inside a third nested accordion panel will shifts to top 1 child panel

Hi All,

I need some help regarding jQuery Accordions.

i have developed an .Net web application using jQuey and CSS, application format looks like below

<div class="accordion">
      <asp:Repeater ID="repAccordian">
             <h4 style="text-decoration: none">
                  .......
             </h4>
      <div>
            some asp controls
            <div class="accordion">
             <asp:Repeater ID="repAccordian1">
             <h3 style="text-decoration: none">
                  .......
             </h3>
            <div>
            some asp controls
                      
                     <div class="accordion">
                         <asp:Repeater ID="repAccordian2">
                         <h2 style="text-decoration: none">
                              .......
                         </h2>
                        <div>
                        some asp controls
                        </div>
                        </asp:Repeater>
                    </div>
            </asp:Repeater>
   </div>
   </asp:Repeater>
</div>

The main issue i'm facing here is..  post bock inside a third nested accordion panel will shifts to top 1 child panel means for example if there are 3 child accordion panels present.a button click inside 3rd panel is activating 1st panel by closing panel where i clicked the button.

  $(function () {

                var icons = {
                    header: "ui-icon-circle-arrow-e",
                    activeHeader: "ui-icon-circle-arrow-s"
                };
                
                $("div.accordion").accordion({
                    icons: icons,
                    collapsible: true,
                    heightStyle: "content",
                    active: false,
                  });
            });

Note: the panels are generated dynamically based on the data present in the database.. 

Let me know if more information required.

Appreciate  any suggestion.