views:

531

answers:

2

Hi, 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.

A: 

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();
}});
ntziolis
could you give an example for "removeButtonDelegate". I'm not sure what that means.
Yael
I modified the example to include the actual delegate. Instead of removing it you could also hide it I guess.
ntziolis
A: 

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();
}});
bjtilley