Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stop colorbox popup closing when clicking anywhere outside the popup

Tags:

colorbox

We have a colorbox modal popup which we don't want to close unless the user clicks the "X" at the top right of the popup. Currently, it is closing if you click anywhere outside the popup area.

Many thanks! Paul

like image 728
user460114 Avatar asked Nov 01 '11 23:11

user460114


1 Answers

Colorbox has options to modify that functionality. Just add this to your colorbox instantiation:

$("#selector").colorbox({
    //your other colorbox options
    //...
    escKey: false,
    overlayClose: false
});
like image 188
uɥƃnɐʌuop Avatar answered Oct 02 '22 17:10

uɥƃnɐʌuop



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!