-1

我有一个asp更新面板和一个div。但是 jquery show 函数不适用于这个 div。有什么办法让它工作吗?

   $(document).ready(function () {
        $("#answerButton0").click(function() {
            $("#answerPanel0").show("slow");
        });

    });

<asp:UpdatePanel ID="updateQuestions" runat="server">
                <ContentTemplate>
                    <div class="descHeader" style="width: 600px;">
                        <asp:Label ID="Label2" runat="server" Text="Last 10 Questions"></asp:Label>
                    </div>
                    <div class="descContent" style="width: 600px; height: auto;">
                        <asp:Timer ID="timerPageLoad" runat="server" Interval="500" OnTick="timerPageLoad_Tick" />
                        <div id="loading" style="display: none; height: 60px;">
                            <asp:Image ID="img1" runat="server" ImageUrl="~/images/site/process.gif" />
                        </div>
                        <div id="questionsPanelDiv" style="display: none;">
                            <asp:Panel ID="pnlQuestions" runat="server">
                            </asp:Panel>
                        </div>
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnAsk" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>

#answerPanel0 和 #answerButton0 是从 pnlQuestions 面板后面的代码动态创建的。

4

1 回答 1

2
   $(document).ready(function () {
        $('#answerButton0').live('click', function () {
            $('#answerPanel0').show('slow');
        });
    });
于 2012-05-07T06:43:12.553 回答