Simple image gallery

Thursday, February 1st, 2007 @ 1:03 pm | filed under: Examples, Visual Effects, Widgets

Continuing in my current project of rewriting all the javascript on Download.com (pity me), I encountered the functions on the screenshots page. A quick rewrite and here’s my SimpleGallery class. It’s not super-duper fancy but it’s not meant to be.

Update: I had a bad js path in my header for the last day or so (doh!) so this example wasn’t working at first. Fixed now…

Some html setup:

 of PreviousNext

Now we execute the function to set it up:

new SimpleGallery({
  startIndex: 0,
  imgUrls: ['http://download.com/i/dl/media/dlimage/10/87/78/108778_medium.jpeg',
'http://download.com/i/dl/media/dlimage/10/87/79/108779_medium.jpeg',
'http://download.com/i/dl/media/dlimage/10/87/81/108781_medium.jpeg'],
  container: 'screenShotImgs',
  currentIndexContainer: 'imgNow',
  maxContainer: 'imgMax',
  nextImg: 'nextImg',
  prevImg: 'prevImg',
});

2 Responses to “Simple image gallery”

  1. anj yamsani Says:

    Hey, I am trying to use stickyWinModal class, it is working great in firefox but failing in IE. seems like event handler for closeSticky is not working. Do you have any fix for it.
    Thanks a lot

    -Anj

  2. Aaron N. Says:

    This is fixed. Download again from the SVN.