views:

21

answers:

1

I managed to design a small 4x4 grid filled with images. Currently, I am styling the ul element using jQuery.

<ul id="imagegrid">
  <li>
    <img src="...">
  </li>
  <li>
    <img src="...">
  </li>
</ul>

So, when I click an element inside this list it just zooms up and shows as a larger image. Now, if I want to simulate a slideshow, how would I go about doing it? Is there a good way through jQuery? (Using regular javascript, I was thinking of doing it using the setTimetout, but maybe jQuery does it better).

+1  A: 

Why go to all this trouble re-inventing the wheel when there are plenty of plugins that people have already created to do this? One that I can think of off the top of my head because I use it is the cycle plugin. There are also lightbox plugins like fancybox that have slideshow options.

Bradley Mountford
@Bradley: Thanks. I will look into that. It appears to me that I am trying to design a hybrid. If I can get the fancybox to just popup one image at a time from a grid, I'm done. Thanks for your time :)
Legend
You can absolutely do that with Fancybox. We use it fairly extensively since you can have it load pretty much any type of content (not just images). If you want to create your own from scratch for learning purposes, more power to you. Checking out the source code of other plugins is a great way to learn from the experience of others.
Bradley Mountford
@Bradley: Thanks for the suggestions. I will start off now :)
Legend
Glad I could help!
Bradley Mountford