views:

638

answers:

0

Hello. I am using jquery scrollTo to scroll contents within a DIV that is overflown. When I click the links, the DIV will vertically scroll its contents... However, I would like this effect to occur when I HOVER over the links, instead of click them.

I don't believe this is an option with jquery's scrollTo. However, there is a jquery api method for HOVER.

This may seem like a simply question, but is there a way to maintain my vertical scrolling functionality of "scrollTo" by hovering over instead of CLICKING? Please help! Thanks in advance! Below is the sample code:

VERTICAL SCROLL: jQuery(function( $ ){

$.localScroll.defaults.axis = 'y';

$.localScroll({ target: '#content', // could be a selector or a jQuery object too. queue:true, duration:500, hash:false, onBefore:function( e, anchor, $target ){ // The 'this' is the settings object, can be modified }, onAfter:function( anchor, settings ){ // The 'this' contains the scrolled element (#content) } }); });

HOVERING: $("#page-wrap li.button").hover(function(){ ...vertically slide here????.....});