php - How to disable the click on overlay to close Colorbox? - Stack Overflow

I want to prevent colorbox close on cboxOverlay clickI'm using this code:$.fn.colorbox({ overlayCl

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

Share Improve this question edited Oct 20, 2014 at 10:56 Barnee 3,4098 gold badges45 silver badges56 bronze badges asked Dec 4, 2012 at 9:19 Cake PHPCake PHP 1635 silver badges12 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745177742a4615275.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信