Use the pageLoad
function:
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});
}
Or, try adding an "end request" event handler with .add_endRequest()
:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InitialiseSettings)
Edit:
It would be a better idea for you to move your code from document.ready
into InitialiseSettings()
, and to then register it as a pageLoaded
event handler.
Code Example
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(InitialiseSettings)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…