2012-04-11 186 views
0

尋找一個簡單的滾動權利,沒有什麼特別的。我的代碼:滑動div滾動停止mouseover

<script type="text/javascript"> 
    // Initialize the plugin with no custom options 
    $(document).ready(function() { 
     // None of the options are set 
     $("div#makeMeScrollable").smoothDivScroll({ 
      mousewheelScrolling: false, 
      hotSpotScrolling: false, 
      autoScrollingMode: "onstart" 
     }); 
    }); 
</script> 

當鼠標滑過div的右邊緣時,滾動停止。在Chrome和IE中發生,否則似乎工作正常?

+0

哪個插件在這裏使用?你能通過我的插件的網址? – 2012-04-11 13:44:32

+0

使用插件和所有相同的腳本等從當前的GitHub下載 – byteman 2012-04-11 15:45:37

+0

想象一下,如果我製作autoScrollingMode:「always」,它可以像你期望的那樣工作。 – byteman 2012-04-11 15:48:45

回答

0

更改代碼:

<script type="text/javascript"> 
    // Initialize the plugin with no custom options 
    $(document).ready(function() { 
     // None of the options are set 
     $("div#makeMeScrollable").smoothDivScroll({ 
      autoScrollDirection: "endlessloopright", 
      autoScrollingMode: "always" 
     }); 
    }); 
</script> 

希望這就像你意!