From 88ecd28ae2607e9977686556f3cd07dd2ae2907c Mon Sep 17 00:00:00 2001 From: Rolf-nl Date: Tue, 21 Jun 2011 03:58:33 -0700 Subject: [PATCH] In setupSlides don't want to compare each slide with this.current tosee if display should be set to none or not? Else no slides are hidden (set to display 'none') when you call setup() after add slides (dynamically or whatever). So, display should be set to none if slide != this.current --- Source/SlideShow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SlideShow.js b/Source/SlideShow.js index 086eb50..9b89cda 100644 --- a/Source/SlideShow.js +++ b/Source/SlideShow.js @@ -132,7 +132,7 @@ var SlideShow = this.SlideShow = new Class({ this.slides.each(function(slide, index){ slide.store('slideshow-index', index).store('slideshow:oldStyles', slide.get('style')); this.storeData(slide); - slide.setStyle('display', (this.current || index == this.options.initialSlideIndex) ? '' : 'none'); + slide.setStyle('display', (slide == this.current || index == this.options.initialSlideIndex) ? '' : 'none'); }, this); return this; },