Question

While clicking outside modal window(iframe), it gets closed that's not suitable for forms etc.. how to disable this thing?? :S

Was it helpful?

Solution

Please take a look at the website: http://colorpowered.com/colorbox/

There's a table with al sorts of key/value options you can add to your colorbox method. One of the keys is: overlayClose
By default this is set to true and the description states:

If true, enables closing ColorBox by clicking on the background overlay.

Just add the key/value pair to the method call and you will have a modal window.

$.colorbox({ overlayClose: false });

This as an alternative to your answer/comment.

OTHER TIPS

escKey: false in the colorbox constructor should do it.

$("#selector").colorbox({
    //your other colorbox options
    //...
    escKey: false,
    overlayClose: false
);

Hope this helps..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top