2013-05-08 103 views
0

我已經爲我的博客添加了一個新的模板,它有一個與博客相關的圖像的滑塊,問題是「滑塊只在單擊下一個按鈕或上一個按鈕時才運行」,我需要自動將其滑動幫我的話,我會感謝他們..如何將自動滑塊功能添加到我的jQuery滑塊?

的代碼是:

<script type='text/javascript'> 
      jQuery(function() { 
       var Page = (function() { 
       var $navArrows = jQuery(&#39;#nav-arrows&#39;).hide(), 
             //$shadow = jQuery(&#39;#shadow&#39;).hide(), 
             slicebox = jQuery(&#39;#sb-slider&#39;).slicebox({ 
             onReady : function() { 
        $navArrows.show(); 
        //$shadow.show(); 
       }, 
        orientation : &#39;r&#39;, 
        cuboidsRandom : true, 
        easing : &#39;ease&#39; 
       }), 
        init = function() { 
        initEvents(); 
        }, 
        initEvents = function() { 
        // add navigation events 
        $navArrows.children(&#39;:first&#39;).on(&#39;click&#39;, function() { 
             slicebox.next(); 
        return false; 
        }); 
       $navArrows.children(&#39;:last&#39;).on(&#39;click&#39;, function() { 
            slicebox.previous(); 
       return false; 
      }); 
      }; 
      return { init : init }; 
      })(); 
      Page.init(); 
      }); 
      </script> 

回答