views:

1288

answers:

1

I am using jScrollPane to scroll a div. Currently the default is to click 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

A: 

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();

Sbm007
Yes, I know how to initialize it, but I want to use mouseover. I will look into your suggestion.
Nic Hubbard