简体   繁体   English

带有中继器的jQuery手风琴,激活行时看不到行详细信息

[英]Jquery accordion with repeater, row details are not visible when activating row

I am trying to use the jquery accordion with a repeater. 我正在尝试将jQuery手风琴与中继器一起使用。 I used the sample directly from the jquery documentation. 我直接从jquery文档中使用了示例。 When I click on the section links, the details open and expand, but you can't see any of the text. 当我单击部分链接时,详细信息会打开并展开,但看不到任何文本。 The html output looks right to me, not sure where this is going wrong. html输出对我来说似乎正确,不确定这哪里出错了。

<script>
$(document).ready(function () {
    $("#accordion").accordion();
});
</script>

<div id="accordion">
    <asp:Repeater ID="respondToExceptionsList" runat="server">

    <ItemTemplate>
        <h3><a href="#">Section 1</a></h3>
        <div>
            sdfffffffffffffff
        </div>
    </ItemTemplate>

    </asp:Repeater>
</div>

This is the html output. 这是html输出。

<DIV id=accordion class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons" role=tablist jQuery1315324170464="2">
    <H3 aria-expanded=true class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" role=tab tabIndex=0 jQuery1315324170464="3">
    <SPAN class="ui-icon ui-icon-triangle-1-s" jQuery1315324170464="13"></SPAN><A tabIndex=-1 href="#">Section 1</A></H3>
    <DIV style="HEIGHT: 19px" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" role=tabpanel>sdfffffffffffffff </DIV>
</DIV>

This is related to the accordion height being set to zero. 这与手风琴的高度设置为零有关。 I am having the same issue using the accordion in an html repeater generated using angularjs . 我在使用angularjs生成的html转发器中使用手风琴遇到了同样的问题。 To fix the problem, the accordion must be refreshed after the data is loaded. 要解决此问题,必须在加载数据后刷新手风琴。 I found the answer in the jquery forums here . 我在这里的jquery论坛中找到了答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM