Closed cxanders closed 4 years ago
var originalClose = $.colorbox.close;
$.colorbox.close = function(){
$.colorbox({ overlayClose:true, width:640, maxHeight:'100%', href:'[your parent url or whatever]', onComplete:function() {
$.colorbox.resize();
parent.$.colorbox.close = originalClose;
} });
};
I thought I had at least a basic understanding of colorbox and have been able to use it with success for some time now. I am trying now to use the 'close' of one colorbox to redirect back to another colorbox, but when I do, that box will not close and instead just reopens itself. This is the code I use on the child colorbox to redirect back to parent colorbox:
These are snippets I've used to try and get the parent box to close, none have worked. No matter what I use on the desired colorbox, it won't close. I've tried:
Apparently I am not understanding why the first code worked and how to 'undo' the reset colorbox close function. Whatever I try, it either does no action or simply reopens itself. I'm beginning to think my idea is impossible to do. Help! Thanks in advance for any suggestions given.