【问题标题】:jQuery Smooth Div Scroll WP - How to start again autoscroll when mouse not over image?jQuery Smooth Div Scroll WP - 当鼠标不在图像上时如何重新开始自动滚动?
【发布时间】:2013-07-21 05:21:27
【问题描述】:

我需要你的帮助: 我正在使用带有 wordpress 的 Smooth Div Scroll

  • 有没有办法“鼠标悬停时停止自动滚动”、“鼠标未悬停时开始自动滚动”? 现在,自动滚动可以工作,但是当我把鼠标放在上面时,它会停止并且不会再次启动。

我在http://broadcast-architech.com/ 这个网站上看到了它,但是没有箭头,我想保留它们以及鼠标滚动。

提前感谢您的帮助。

【问题讨论】:

  • 如果您在问题中包含相关代码,您会发现更容易获得帮助。此外,您还需要说明到目前为止您已经尝试过什么。

标签: wordpress html scroll alignment


【解决方案1】:

代码可能如下所示:

// Initialization
var myScroller = $("div#makeMeScrollable").smoothDivScroll({
    autoScrollingMode: 'onStart',
    autoScrollingDirection: 'endlessLoopLeft'
});

myScroller.on('mouseenter', function(){
    myScroller.smoothDivScroll("stopAutoScrolling");
}).on('mouseleave', function(){
    myScroller.smoothDivScroll("startAutoScrolling");
});

这是一个演示:

http://jsfiddle.net/tkahn/3McmN/2/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-15
    • 2010-10-06
    相关资源
    最近更新 更多