I just started using Colorbox modal plugin and cannot figure out how to get the overlay.
jQuery:
$("#button_writereview").colorbox();
HTML:
<a id="button_writereview" href="...">Link</a>
I notice in the examples that they used a css file and a empty div called cboxOverlay in the html file. How does this work?
You definitely need to use one of the css files in the examples or write your own. This is what controls the appearance of colorbox's windows/overlays/buttons etc.
The cboxOverlay element and all other necessary elements are created dynamically when you open one of the windows - you don't have to add it, or any other markup manually. When you saw it, you were probably looking at the generated source after opening one (Firebug?) - it shouldn't be there otherwise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With