From: yamat0jp Date: Mon, 11 Sep 2017 12:15:19 +0000 (+0900) Subject: complete slideshow X-Git-Url: http://git.osdn.net/view?p=pybbs%2Fpybbs.git;a=commitdiff_plain;h=d89ffc54acd3ba0775038cde00c1738f69f70191 complete slideshow --- diff --git a/static/js/top.js b/static/js/top.js index 1c59228..ba3168c 100644 --- a/static/js/top.js +++ b/static/js/top.js @@ -22,7 +22,6 @@ $(function(){ $indicator.html(indicatorHTML); - function goToSlide(index){ $slideGroup.animate({left:-100*index+'%'},duration,easing); currentIndex = index; @@ -45,20 +44,7 @@ $(function(){ $indicator.find('a').removeClass('active') .eq(currentIndex).addClass('active'); } - - function startTimer(){ - timer = setInterval(function(){ - var nextIndex = (currentIndex+1) % slideCount; - goToSlide(nextIndex); - },interval); - } - - function stopTimer(){ - clearInterval(timer); - } - - - + $nav.on('click','a',function(event){ event.preventDefault(); if ($(this).hasClass('prev')){ @@ -74,12 +60,9 @@ $(function(){ goToSlide($(this).index()); } }); - - - + goToSlide(currentIndex); - - + }); }); diff --git a/templates/top.htm b/templates/top.htm index 215f705..5d117bb 100755 --- a/templates/top.htm +++ b/templates/top.htm @@ -6,7 +6,7 @@ Top Page - +