【问题标题】:Scrolling with mouseover event使用鼠标悬停事件滚动
【发布时间】:2010-12-12 02:02:06
【问题描述】:

我正在使用 jScrollPane 滚动 div。当前默认是单击向上和向下箭头来滚动窗格。但是,我想改用鼠标悬停。我已经查看了代码,但如何做到这一点并不完全清楚。

以前有人做过吗?想法?

http://www.kelvinluck.com/assets/jquery/jScrollPane/scripts/jScrollPane.js

【问题讨论】:

    标签: jquery events mouseover jscrollpane


    【解决方案1】:

    发件人:http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

    用法

    只需将以下文件包含在 您页面的头部:

    * jQuery (I'm using 1.2.6 here)
    * the mouse wheel plugin (if you want mouse wheel support)
    * the jQEm plugin (if you want your scroll panes to automagically resize when the user changes text size)
    * jScrollPane.js
    * jScrollPane.css
    

    查看页面上的示例以了解它是如何完成的。

    编辑:对不起,我看错了你的帖子,你改用鼠标悬停事件。

    你可以做的是:

    为向上和向下按钮绑定mouseover事件处理程序,并让它们调用$(this).click();

    【讨论】:

    • 是的,我知道如何初始化它,但我想使用鼠标悬停。我会考虑你的建议。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-13
    • 2012-06-17
    • 2017-05-14
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 2011-10-03
    相关资源
    最近更新 更多