开发者

how to close parent window when colorbox is closed?

I'm loading colorbox on page load.

parent.$.fn.colorbox({href: "#inline_example1", overlayClose:false, inline:true,width:'80%',height:'90%', onClosed:function(){} ,开发者_开发技巧onLoad: function() { }});

I want to close the parent window when the colorbox is closed. Please tell me what should I write inside onClosed function.


Your question is not very clear what parent is but try something like:

window.opener.close();

or

window.close();

or

window.parent.close();

I hope one of these would help!!


In your onClosed handler, you could put:

window.close();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜