[英]accordion not working with Update panel
I am creating a child page using the master page. 我正在使用母版页创建子页。 The Content Place Holder in the master page is inside and Update panel like below 主页中的内容占位符位于内部,而“更新”面板如下所示
<asp:UpdatePanel runat="server" ID="MainUpdatePanel">
<ContentTemplate>
<asp:ContentPlaceHolder ID="cphMain" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
On my child page I have Jquery accordion. 在我的子页面上,我有Jquery手风琴。 One of the accordion panel has a button, But when I click on the button the child page style is not working. 一个手风琴面板上有一个按钮,但是当我单击该按钮时,子页面样式不起作用。
Use this script Like 使用此脚本喜欢
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
if (args.get_error() == undefined) {
$(function () {
//Your script
});
}
}
</script>
This will not work on post back that your update panel is giving to you. 在将更新面板提供给您的情况下,这将不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.