OSDN Git Service

complete slideshow
authoryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 11 Sep 2017 12:15:19 +0000 (21:15 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 11 Sep 2017 12:15:19 +0000 (21:15 +0900)
static/js/top.js
templates/top.htm

index 1c59228..ba3168c 100644 (file)
@@ -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);
-       
-       
+               
        });
        
 });
index 215f705..5d117bb 100755 (executable)
@@ -6,7 +6,7 @@
        <title>Top Page</title> 
        <link rel=stylesheet href='static/css/top.css'>
        <link rel=stylesheet href={{static_url('css/normalize.css')}}>
-       <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js></script>   
+       <script src={{static_url('js/jquery-1.10.2.min.js')}}></script>
        <script src={{static_url('js/top.js')}}></script>
        <script src={{static_url('js/modernizr.custom.min.js')}}></script>
        <script src={{static_url('js/jquery-ui-1.10.3.custom.min.js')}}></script>