views:

142

answers:

3

Hey all,

im building a webshop in Drupal and i was wondering if you could help me with the following problem:

I got one big image frame (500x500) and 5 little image thumbnails(95x95) underneath the big one.

How can i realise that if the visitor clicks on the thumbnail, the big image frame gets filled with that specific image?

A: 

Drupal uses jQuery so you can write a simple jQuery script to handle this (not sure if there's already a plugin to do that). Just add all the img tags (make sure all of them except the first one are hidden[display=none]). Then when a thumbnail is clicked/hovered do a $(big_img_holder).replace() with the tag for the image to be shown. Tell me if you want to see some code and I'll try to show you.

You can see this plugin as an exapmle. Just replace the numbers on the right with thumbnails and you're ready to go ;-)

matix
+1  A: 

jQuery is the right direction, but the strength of Drupal is based on doing things "the drupal way", which means, I guess in your case, to use Views as the origin for the thumbnails using imagecache + lightbox, and somehow change the main "frame".

I used jcarousel in some cases (for different but similar uses) and it works nice. I guess it is possible to trick it to do what you need, or - better - to find an existing module that do what you want.

I know, many Drupal buzzwords, and a stiff curve to overcome, but this is the right direction in case you want to base your site on Drupal.

If you don't need all of these, and want a static page+jquery, Drupal might be an overkill altogether.

Shushu
+1  A: 

If you use Views, Imagecache, and the Lightbox2 module, you can create image galleries out the arse and tell it to link the field to its large size and use Lightbox2 as the method. This is how I do most of my galleries.

Kevin