使用pageLoad
功能:
function pageLoad(sender, args) {
InitialiseSettings();
}
function InitialiseSettings(){
// replace your DOM Loaded settings here.
// If you already have document.ready event,
// just take the function part and replace here.
// Not with document.ready
$(element).slideUp(1000, method, callback});
$(element).slideUp({
duration: 1000,
easing: method,
complete: callback});
}
或者,尝试添加一个“结束请求”事件处理程序.add_endRequest()
:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InitialiseSettings)
编辑:
将代码从document.ready
移至InitialiseSettings()
,然后将其注册为pageLoaded
事件处理程序对您来说是一个更好的主意。
代码示例
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(InitialiseSettings)