开发者

Scrolling with mouseover event

I am using jScrollPane to scroll a div. Currently the default is to cl开发者_如何学Cick the up and down arrows to scroll the pane. But, I would like to use mouseover instead. I have looked at the code but it is not entirely obvious how one would do this.

Has anyone done this before? Ideas?

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


From: http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

Usage

Just include the following files in the head of your page:

* 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

Look at the examples on the page to see how it's done.

Edit: Sorry I misread your post, you to use the mouseover event instead.

What you could do is:

Bind a mouseover event handler for the up and down buttons, and make them invoke $(this).click();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜