Hello guys,

I'm building a website with Dreamweaver CS4 that has a mainPicture DIV that is populated by whatever image is clicked on in the sidebar:


For each of the big images (and I have dozens of pages), there is a Before image, which basically shows what the After image looked like before I colour corrected it. The After button will return you back to the original image.

The images the Before and After buttons load are dependent on what image is being displayed in the mainPicture DIV (which is triggered by the thumbnails in the sidebar). I'm thinking the best way to achieve this may be to dynamically assign a CSS to the Before and After buttons when one of the thumbnails gets clicked.

So the question is: is it possible to dynamically assign a css when an image (like one of the thumbnails) is pressed? If you check the source code on the page, I have declared a number of DIVs that I'm hoping I can dynamically assign to the Before and After text (will turn these into DIVs first)

Thank you so much in advance..