开发者

want to delay closing of fancybox window

I want to automatically close a fancybox iframe, but I want to give it a delay.

$(document).ready(function() {
 parent.$.fancybox.close();
});

The code above will automatically close the window successfully, but I want to add a delay, so they may read the message the page displays before it au开发者_如何转开发to closes for them.


You can use setTimeout:

setTimeout("parent.$.fancybox.close()", 1000);


If you are using jquery 1.4 try the delay() function:

parent.$.fancybox.delay(2000).close();

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜