Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show comment form and other info along with images in colorbox

What is the best way to show along with an image a comment form, comments and other image related information with colorbox? Like in facebook's profile photos bar images?

Just opening an image node in colorbox like 'node/196?iframe=true' is much slower than opening an image.

like image 599
Anglo Avatar asked Jan 25 '26 18:01

Anglo


1 Answers

the inline config parameter would be one solution

<style type="text/css">
    .hide-colorbox{display:none}
    #cboxLoadedContent .hide-colorbox{display:block}
</style>

$(".example8").colorbox({inline:true, href:"#inline_example1"});

<div id="inline_example1" class="hide-colorbox">
    <p><strong>This content comes from a hidden element on this page.</strong></p>
</div>

You can either output the required html on page load and then hide with css, or you can create the content based on the page layout.

like image 137
chim Avatar answered Jan 28 '26 11:01

chim