X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=static%2Fjs%2Ftop.js;h=ba3168c777eca7a8113c005a601a0ff54f07ca9a;hb=HEAD;hp=1c59228bc8feadf4fe65183675ce3042751efa19;hpb=2079bea15eafffd734e60319084e4161d9e8e7cd;p=pybbs%2Fpybbs.git 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); - - + }); });