Search code examples
popupparentcolorbox

Colorbox popup: click on parent window without closing the colobox window


I'm using colorbox to display the help of my webapp. It's nice but what I want now is to open the popup with the help, and that the user can follow a tutorial video and doing at thte same time in the app.

So the possibility to click in the parent window without closing the colorbox window. I don't want to do action from the colorbox to the parent window, but directly click in the parent window, while watching my vid in the colorbox window.

I'm not sure colorbox is the tool to use with for this behaviour, but want to ask before to switch to another one.

Thanks Bastien


Solution

  • You can set overlayClose and escKey to false.
    Then you have to remove the overlay div by css. Like the following.

    #cbobOverlay {
        display: none;
    }
    

    So, to finish you probably have to add some button or link to trigger close when you want.

    <a href="javascript:void(0)" class="close">Close</a>
    
    jQuery('.close').click(function() {
        jQuery.colorbox.close();
    });
    

    Hope this help.

    Reference: