jColorbox does not group images

(Tomasz) #1

I’m using Colorbox in form of Yii 1.x widget. Everything works fine, except for the fact, that Colorbox does not group my images and does not show <-- / --> buttons.

This is part of code generated by my page:

<div class="media-gallery-wrapper">

	<div class="media-gallery-item">

    	<a href="" class="colorbox cboxElement" title="">

        	<img src="" alt="" width="450" height="450">




Each three of such blocks are followed by:

<div class="media-gallery-separator"></div>

And that’s all. Even though I’ve been trying to modify my code and browsing through Colorbox examples, I don’t see any significant difference between my code and those on examples. Thus, I don’t know, what makes my Colorbox not grouping images?

(Oligalma) #2

you can try with ubergallery http://www.ubergallery.net/.

With a fews tweaks, I successfully implemented it in my Yii website.

(Tomasz) #3

Grouping in Colorbox works only, if you base it on rel attribute. You can’t use classes.

So, this:

<a href="<?php echo $filename; ?>" class="colorbox" title="<?php echo $title; ?>">

<script type="text/javascript">



won’t work (no image grouping, no <- / -> buttons), while this:

<a href="<?php echo $filename; ?>" rel="colorbox" title="<?php echo $title; ?>">

<script type="text/javascript">



will work like a charm.