2013-11-27 119 views
0

Iam使用ajax手風琴。是否有可能在另一手風琴中添加ajax手風琴。另一部手風琴內的手風琴

我嘗試添加這一點,但內裏的手風琴沒有加載(沒有得到顯示)

<ajax:Accordion ID="accordionCountry" HeaderCssClass="headerStyle marginUpDown" HeaderSelectedCssClass="headerSelectedStyle" ContentCssClass="contentBackground" runat="server" SelectedIndex="-1" FadeTransitions="true" SuppressHeaderPostbacks="true" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" AutoSize="None"> 
      <HeaderTemplate> 
       <asp:Panel ID="pnlShowCategory" runat="server" CssClass="cursorPointer categoryPanelBackground marginUpDown"> 
        <table cellpadding="0" cellspacing="0" width="98%"> 
         <tr> 
          <td align="left"> 
           <asp:Label ID="lblCategoryName" runat="server" Text='<%# Eval("CategoryName") %>' 
            CssClass="paddingLeft"></asp:Label> 
          </td> 
          <td align="right"> 
           <asp:Image ID="Image3" runat="server" ImageAlign="Right" Height="20px" CssClass="verticalAlignMiddle" /> 
           <asp:HiddenField ID="hdnCategoryId" runat="server" Value='<%# Eval("CategoryId") %>' /> 
          </td> 
         </tr> 
        </table> 
       </asp:Panel> 
      </HeaderTemplate> 
      <ContentTemplate> 
       <ajax:Accordion ID="accordionCountry1" HeaderCssClass="headerStyle marginUpDown" HeaderSelectedCssClass="headerSelectedStyle" 
        ContentCssClass="contentBackground" runat="server" SelectedIndex="-1" FadeTransitions="true" 
        SuppressHeaderPostbacks="true" TransitionDuration="250" FramesPerSecond="40" 
        RequireOpenedPane="false" AutoSize="None"> 
        <HeaderTemplate> 
        </HeaderTemplate> 
        <ContentTemplate> 
        <asp:Panel ID="pnl" runat="server" CssClass="cursorPointer categoryPanelBackground marginUpDown"> 
        <table cellpadding="0" cellspacing="0" width="98%"> 
         <tr> 
          <td align="left"> 
           <asp:Label ID="lblSubCategoryName" runat="server" Text='<%# Eval("SubCategoryName") %>' 
            CssClass="paddingLeft"></asp:Label> 
          </td> 
          <td align="right"> 
           <asp:Image ID="Image3" runat="server" ImageAlign="Right" Height="20px" CssClass="verticalAlignMiddle" /> 
          </td> 
         </tr> 
        </table> 
       </asp:Panel> 
        </ContentTemplate> 
       </ajax:Accordion> 
      </ContentTemplate> 
     </ajax:Accordion> 

回答

0

嘗試使用jQuery手風琴,它的好,檢查以下鏈接了:你以後再 點擊運行點擊下面

(function($) { 

var allPanels = $('.accordion .dd').hide(); 

$('.accordion .dt a').click(function() { 
allPanels.slideUp(); 
$(this).parent().next().slideDown(); 
return false; 
}); 
})(jQuery); 

Check This

鏈接