Add css class / id to element when matched with another element

Hi,

I’ve got a scenario where i’ve got a list of text names on a page and a rotating gallery of images. Each image relates to one of the names. What i would like to do is highlight the name by adding a css class or id when the related image comes into focus.

I’m sure i can do this by using the rel element to relate to the id of the image (or the other way round!) but i’m not sure exactly how. I presume it’s using jquery live and matching with selectors.

I’m using jquery and the galleria plugin.

If anyone can help me or even point me in the right direction i would be massively grateful.

Thanks!

Kind of yeah, it seems i can access the LOADFINISH event and get the data i need from that.

Thank you very much for responding!

The galleria page shows an image nav bar at the bottom of the image which adds an “active” class to indicate which is the active one. Is that kind of what you want to achieve?