0

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

有没有人这样做过?想法?

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

4

1 回答 1

0

来自: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();

于 2009-11-01T18:12:29.400 回答