0 users online. Create an account or sign in to join them.Users

Search

Hi,

I am currently trying to use the JQuery Colorbox script (partly because I noticed it was used on this site), but I am having a problem with it wanting to display each of the photos contained within all of the entries on the page. For example:

Say I have 4 entries on the page, and each entry has one picture associated with it, no matter which entry photo I click on, JQuery of course wants to group all 4 photos into a slideshow.

Code I am using: <a href="{$root}/image/2/475/450/5/images/good-music/{photos/item/picture/filename}" rel="colorbox" title="{photos/images/caption}">

<img src="{$root}/image/2/150/150/5/images/good-music/{photos/item/picture/filename}" />

</a>

Does anyone know if there is a way to tell JQuery to process the entry photos separately?

I imagine this is more of a javascript question, and if so, I apologize for asking on this forum, but I wanted to make there wasn’t some type of XSLT I could throw in there.

Thanks as always!

Adam

Just a guess but you could try and create a separate rel for each entry and corresponding JQuery code, with each rel having the same value. Maybe not the best method if you have many entries though..

The rel attribute is what colorbox uses to group images. If you just want to target the links for colorbox, use a class. Only use a rel when you need to group them.

Hey you two, thanks a lot! I will make that adjustment once I get home. Huuuge thanks! I was tossing and turning last night trying to think of a way…doesn’t help being a novice web developer! Thanks again.

Freaking sweet!!! Czheng - you da man!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details