jquery scrollpane and scrollTo at same time

Posted by steve on Stack Overflow See other posts from Stack Overflow or by steve
Published on 2010-05-15T09:48:57Z Indexed on 2010/05/15 9:54 UTC
Read the original article Hit count: 220

Filed under:
|
|

Current demo here: http://www.studioimbrue.com/sites/eliotdudik

I have the tabs system working wonderfully. I'm trying to get it so that if you're down a ways on the gallery and then click "foreword" or any menu item, it scrolls you back to 0,0.

The current sliding code is as follows:

$('#wrapper ul li').click(function() {
    $(window).scrollTo($(this).next('li'), 500, {offset: {top:0, left:-50}}, {easing:'easeOutExpo'} );
});

And I'm trying to add something like this under it:

$('#menu li').click(function() {
    $(window).scrollTo(0,0, 500, {offset: {top:0, left:-50}}, {easing:'easeOutExpo'} );
});

It continues switching tabs, but it won't scroll back to the beginning!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jscrollpane