Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 295
Yael Avatar asked Apr 21 '10 17:04

Yael


1 Answers

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();
}});
like image 193
ntziolis Avatar answered Oct 14 '22 16:10

ntziolis