/ 设置 10 秒超时 // 每日统计清 0 runtime_set('todaycomments', 0); runtime_set('todayarticles', 0); runtime_set('todayusers', 0); if ($forumlist) { $fidarr = array(); foreach ($forumlist as $fid => $forum) { $fidarr[] = $forum['fid']; } forum_update($fidarr, array('todayposts' => 0, 'todaythreads' => 0)); } // 清理临时附件 attach_gc(); // 当天24点 $today = strtotime(date('Ymd')) + 86400; runtime_set('cron_2_last_date', $today, TRUE); // 往前推8个小时,尽量保证在前一天 升级过来和采集的数据会很卡 // table_day_cron($time - 8 * 3600); cache_delete('cron_lock_2'); } } } ?>php - How to disable the click on overlay to close Colorbox? - Stack Overflow|Concepts Of Algorithm

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

admin2025-04-21  3

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745177743a289006.html

最新回复(0)