开发者

Colorbox - removing the close button from a specific window

I'm using the colorbox plugin to display messages on my web page. One of them is a "wait for response" message, and I don't want the user closing it by himself.

I know how to unbind the ESC key, and to disable the overlay close, but I still have a problem with the close button. I found I could remove it in the css like this: #cboxClose{display:none !important;} but this will effect all my colorbox messages..

Is there a way to remove the close button from a开发者_高级运维 specific message? Maybe from the jsp itself?

Thanks, Yael.


What about removing the button after this specific box has opened via jquery. Colorbox provides you with the necessary event hook:

$('selector').colorbox({onLoad: function() {
    $('#cboxClose').remove();
}});


Thanks ntziolis this is exactly what I was looking for. I was able to add this to my colorbox call like so. I am using it to open a separate web page, notice the iframe:true

$(".class_name").colorbox({innerWidth:500, innerHeight:400, iframe:true, escKey:false, overlayClose:false,onLoad: function() {
    $('#cboxClose').remove();
}});


there is a option in newer version of colorbox

closeButton true Set to false to remove the close button.

see here http://www.jacklmoore.com/colorbox/

closeButton: false

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜