From d123cd9551bab80cf7d7a6c79dc7e94eabc5572e Mon Sep 17 00:00:00 2001 From: Slava Oliyanchik Date: Sun, 24 Mar 2013 20:34:09 +0400 Subject: [PATCH] Fix Inner nav. doesnt work if slide is the last. --- shower.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/shower.js b/shower.js index 9c455a2..899002c 100755 --- a/shower.js +++ b/shower.js @@ -73,20 +73,15 @@ window.shower = window.shower || (function(window, document, undefined) { if (slide.isFinished()) { timer = setInterval(function() { - console.log('fin'); clearInterval(timer); - if ( ! slide.isLast()) { - shower.next(); - } + shower.next(); }, slide.timing * (slide.innerLength || 1)); } else { timer = setInterval(function() { if (slide.isFinished()) { clearInterval(timer); - if ( ! slide.isLast()) { shower.next(); - } } else { slide.next(shower); } @@ -131,10 +126,8 @@ window.shower = window.shower || (function(window, document, undefined) { slide = this; if ( ! slide.hasInnerNavigation || slide.isFinished()) { - if ( ! slide.isLast()) { - shower.next(); - return false; - } + shower.next(); + return false; } if ( ! slide.isFinished()) { @@ -395,11 +388,6 @@ window.shower = window.shower || (function(window, document, undefined) { ret = false, slide; - // If don't exist next slide - if (! nextSlide) { - return ret; - } - slide = shower.slideList[currentSlideNumber]; if (shower.isSlideMode()) {