views:

54

answers:

1

I have a set of Lightbox images that load as thumbnails on the page dynamically from Drupal. It's working fine.

However, I'd like to have a seperate 'View Slideshow' button on the same page that opens to the first image in the set, without having to reference the first image with the img tag, etc, as the image will change from time to time.

I'd like to do something like this (it doesn't work as shown):

<a href="#" rel="lightbox[field_img_additional]" >View Slideshow</a>

Any thoughts?

+1  A: 

(Without seeing more of your code), one way to get a particular anonymous element is to use the :eq() selector (the equal selector).

$("img:eq(0)")

Where '0' represents the first image returned. '3' would be the 4th image returned etc.

I could probably be more helpful if you posted some code.

orolo