I want to prevent colorbox close on cboxOverlay click
I'm using this code:
$.fn.colorbox({ overlayClose: false });
But it doesn't work.
I also disabled Esc close
$(document).bind("keydown.cbox_close", function (e) {
if (e.keyCode === 27) {
e.preventDefault();
cboxPublic.close();
}});
Esc code working properly .
But how to prevent colorbox close for overlay?
Thanks
I want to prevent colorbox close on cboxOverlay click
I'm using this code:
$.fn.colorbox({ overlayClose: false });
But it doesn't work.
I also disabled Esc close
$(document).bind("keydown.cbox_close", function (e) {
if (e.keyCode === 27) {
e.preventDefault();
cboxPublic.close();
}});
Esc code working properly .
But how to prevent colorbox close for overlay?
Thanks
- php
- javascript
- jquery
- cakephp-2.0
- colorbox
Share
Improve this question
edited
Oct 20, 2014 at 10:56
Barnee
3,40988 gold badges4545 silver badges5656 bronze badges
asked
Dec 4, 2012 at 9:19
Cake PHP
Cake PHP
16355 silver badges1212 bronze badges
1
-
:) i found $(".ajax").colorbox({overlayClose: false});
– Cake PHP
Commented
Dec 4, 2012 at 9:30
Add a ment
|
1 Answer
1
Reset to default
5
Shouldn't it be:
$.colorbox({ overlayClose: false });
See working demo here: Fiddle