I just started using Colorbox modal plugin and cannot figure out how to get the overlay.
jQuery:
$("#button_writereview").colorbox();
HTML:
<a id="button_writerevie开发者_开发百科w" 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.
精彩评论