how to close parent window when colorbox is closed?
Question
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.
Solution
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!!
OTHER TIPS
In your onClosed handler, you could put:
window.close();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow