Swiss Army II
by
, 03-28-2009 at 02:09 PM (36932 Views)
I just wanted to Blog this info to make it easy to find. It regards the Swiss Army Slide Show script:
http://www.dynamicdrive.com/dynamici...army/index.htm
Because many people want even more flexibility than it originally provided, I've updated it (script only, right click 'save as'):
http://home.comcast.net/~jscheuer1/s...les/swiss_2.js
This is a drop in replacement for swissarmy.js and requires no changes in the on page code other than to use this new external script in place of the original external script.
However - It adds the following style hooks (some were already there in the original version but undocumented on its demo page):
- #outer$ - outer division containing the show images.
- #master$ - division directly nested in #outer$, contains the two divisions that hold the tables that hold the images.
- #canvas$_0 - one of the two divisions that holds a table that holds the images.
- #canvas$_1 - the other of the two divisions that holds a table that holds the images.
- #desc$ - outer division containing the descriptions (holds the description prefix text, if used, and the below description span).
- #imgdsc$ - span that holds the descriptions.
- #counter$ - outer division holding the counter.
- #thecnt$ - span updated with actual image counter.
- #controls$ - outer division for the controls, if using images for buttons, this is actually a table.
- #prev$ - input button for previous image.
- #gostp$ - input button that starts or stops the slide show (a toggle).
- #next$ - input button for next image.
- #goto$ - text input for jumpto feature.
- #go$ - input button "GO" button for jumpto feature.
Each slideshow on your page has a number. The first one is 0, the second one is 1 and so on. If you only have one slideshow, it's 0. So to style the description's outer container for it, use a style rule like (for example, replacing the $ with the number corresponding to the slideshow):
The script also adds the following optional configuration properties:Code:#desc0 { position: relative; top: - 5px; }
- slides#.previous_value - defaults to ' << '
- slides#.next_value - defaults to ' >> '
- slides#.move_desc_up - set to 1 to move descriptions up for shorter images, requires position:relative; and z-index:100; for #imgdsc$ style selector.
- slides#.desc_pic_width - set to 1 for description container (#desc0) width to follow changing image widths
- slides#.count_prefix - text to prefix the count, defaults to 'Viewing Image: '
- slides#.count_sep - text to separate the two count numbers, defaults to 'of'
- slides#.once - Stop after one revolution? Use 1 for stop at last slide, 2 for stop at first slide. Omit or use 0 for continuous slide show.
Edit: Amended to include slides#.once property 8/10
Add precision in the description of this update 9/10