我對jQuery插件smoothdivscroll的問題很少。Smooth Div Scroll - 滾動鼠標右鍵重置
本質上講,我試圖讓插件來爲這個頁面運行:http://www.smoothdivscroll.com/demo.html
不過,我有改變的JavaScript,因爲是需要自動滾動,但允許熱點工作爲好,但恢復自動滾動鼠標離開熱點。
雖然下面的代碼工作,在你離開右邊的觸發器之後,它'重置'回到第一個div。
是否有任何方法可以將其設置爲從設置位置恢復滾動?
代碼:
// Initialize the plugin with no custom options
$(document).ready(function() {
// I just set some of the options
$("div#makeMeScrollable").smoothDivScroll({
mousewheelScrolling: true,
visibleHotSpotBackgrounds: "always",
autoScrollingMode: "endlessright"
});
});
//This is just to make the scroller pause...
$("#makeMeScrollable").bind("mouseover", function() {
$(this).smoothDivScroll("stopAutoScrolling");
}).bind("mouseout", function() {
$(this).smoothDivScroll("startAutoScrolling");
});
感謝,但仍發瘋復位到第1格設置一次。但整齊的語法總是很好。 – 2012-03-27 08:41:59
我很好奇,如果它是一個必須解決的錯誤,請看這個。你有一個測試頁的URL? – tkahn 2012-03-27 14:39:13
http://www.vettacreative.co.uk/scroll/如果你也使用左側和右側的熱點,你會明白我的意思。謝謝 – 2012-03-30 09:50:54