开发者

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();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜