Pause in JQuery based on a condition (Waiting for RegisterClientScriptBlock)
I'm trying to get my JQuery to pause until an object has been loaded. I have seen the .delay() f开发者_运维百科unction but I don't want to delay a specific object $('item').delay(10) so can I do something like below?
while(myObject==null){
// 1 second wait for ScriptManager.RegisterClientScriptBlock to finish building Json
pause(1);
}
DosomethingWithJson();
Update: try this: myObject.ready();
精彩评论