【问题标题】:Smooth Div Scroll Pause/Play平滑 Div 滚动暂停/播放
【发布时间】:2012-06-06 05:34:40
【问题描述】:

http://www.smoothdivscroll.com 的滚动功能正是我们正在寻找的,但是我们特别需要在您移动滑块中的图像时让滚动“暂停”,然后当您将鼠标移出时滚动会再次播放.目前,当您将鼠标悬停在图像上时,滚动会继续,我们如何在鼠标悬停和鼠标移出时暂停和播放?左右箭头也一样。一旦您与这些交互,滚动条就会完全停止,我们希望在您将鼠标从箭头上移开后它会自动再次播放。

任何帮助将不胜感激!

【问题讨论】:

    标签: jquery smooth-scrolling


    【解决方案1】:
    $(document).ready(function() {
    $("#makeMeScrollable").smoothDivScroll({
        mousewheelScrolling: true,
        manualContinuousScrolling: true,
        visibleHotSpotBackgrounds: "always",
        autoScrollingMode: "always"
    });
    
    // Mouse over
    $("#makeMeScrollable").bind("mouseover", function(){
        $("#makeMeScrollable").smoothDivScroll("stopAutoScrolling");
    });
    
    // Mouse out
    $("#makeMeScrollable").bind("mouseout", function(){
        $("#makeMeScrollable").smoothDivScroll("startAutoScrolling");
    });
    
    
    
    });​
    

    这应该可以,在这里测试http://jsfiddle.net/EEAFs/

    【讨论】:

      猜你喜欢
      • 2021-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多