아래에 jQuery 애니메이션 그래프를로드하는 데 fadeIn에 몇 가지 비정상적인 현상이 있습니다. btnPreviewGraph의 두 번째 클릭시 한 번만 작동하지만 결과는 표시되지만 표시되지는 않습니다. 페이드 인 및 상당한 지연. 누군가 조언 해 주실 수 있습니까?JQuery fadein은 한 번만 작동합니다.
$("#<%=btnPreviewGraph.ClientID%>").click(function() {
var Manager = Sys.WebForms.PageRequestManager.getInstance();
Manager.add_endRequest(function() {
$(".extras_result").each(function() {
// get the width of the bar from the span html
var length = $(this).find("span").html();
// Animate the width of the 'p' with a callback function
$(this).find("p").animate({ 'width': length }, 700, function() {
// once the bar animation has finished, fade in the results
$(this).find("span").fadeIn(800);
});
});
});
});
<asp:Button ID="btnPreviewGraph" runat="server" ClientIDMode="Static"
Text="Preview Qualified Statistics" CausesValidation="False"/>
<asp:UpdatePanel ID="upnlPreviewChart" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnPreviewGraph" EventName="Click" />
</Triggers>
<ContentTemplate>
<div class="row">
<asp:Label runat="server" ID="Label1" Text="No. of qualified members"
CssClass="label">
</asp:Label>
<br /><br />
<table cellpadding="0" cellspacing="0" class="extras_table" style="height: 120px">
<tr>
<th class="extras_y-desc" scope="row">Male</th>
<td><div class="extras_result"><p class="extras_p"> <span>350</span></p></div></td>
</tr>
<tr>
<th class="extras_y-desc" scope="row">Female</th>
<td><div class="extras_result"><p class="extras_p"> <span>300</span></p></div></td>
</tr>
<tr>
<th class="extras_y-desc" scope="row">Unknown</th>
<td><div class="extras_result"><p class="extras_p"> <span>500</span></p></div></td>
</tr>
<tr>
<td></td>
<td class="extras_x-desc">
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
코드 예에서는 하나 더합니다. –