I am using Colorbox 1.3.6 with jQuery 1.4.2. Somehow the folowing code did not work for me:
$(document).ready(function() {
$.colorbox({href: "something.htm", open: true});
});
which won't show up automatically, but this one works:
$(document).ready(function() {
$("#some_element").colorbox({href: "something.htm", open: true});
});
I tried attaching to $("head")
which also works! And then I checked the generated elements, it seems that colorbox just added class="cboxElement"
to head element and other things all in the body.
But I do not sure if this is a good way to do it (auto popup when the page is loaded) and I can't figure out why $.colorbox did not work!
Please help!