stirman let me know I had a missing { in the code. Right after the first function. This is the corrected version in case someone uses it as a base for something else.
jQuery(function( $ ){ var positions = [ '-=900', '+=900', 4000 ];//scroll positions var $links = $('div.move_link a').click(function(){ var index = $links.index(this);//which link is this? $.scrollTo( positions[index], 300, {axis:'x'}); return false;//don't let that # appear on the url }); }); Ariel Flesler On 5 feb, 12:11, Ariel Flesler <[EMAIL PROTECTED]> wrote: > I think the problem is that you are not preventing the # from > appearing in the url, that generates some sort of default scroll, I'd > bind those onclicks in a non-obstrusive way, try this: > > <script type="text/javascript"> > jQuery(function( $ ) > $.scrollTo.defaults.axis = 'x';//so we don't need to specify each > time. > var $links = $('div.move_link a');//the 3 links > > $links.eq(0).click(function(){//left > $.scrollTo( '-=900', 300 ); > return false;//don't let that # appear on the url > }); > $links.eq(1).click(function(){//right > $.scrollTo( '+=900', 300 ); > return false; > }); > $links.eq(2).click(function(){//current > $.scrollTo( 4000, 300 ); > return false; > });}); > > </script> > > That's it. If you want a smaller, cooler way: > > <script type="text/javascript"> > jQuery(function( $ ) > var positions = [ '-=900', '+=900', 4000 ];//the scroll positions > of each link > var $links = $('div.move_link a').click(function(){ > var index = $links.index(this);//which link is this ? 0, 1 or > 2 ? > $.scrollTo( positions[index], 300, {axis:'x'}); > return false;//don't let that # appear on the url > });}); > > </script> > > I hope it works well for you. > Cheers > Ariel Flesler > > On 5 feb, 03:18, stirman <[EMAIL PROTECTED]> wrote: > > > > > Hey all, somewhat new to jQuery.. glad to have found this group, hope > > to be involved and help out when I can. > > > Trying out the scrollTo plugin atwww.stirman.net... just some dummy > > data there now. > > > Everything is working great in Safari, but in FF, the scrollTo links > > don't work at all? Is there something I am missing? > > > (scrollTo:http://plugins.jquery.com/project/ScrollTo) > > > Thanks! > > -Stirman- Ocultar texto de la cita - > > - Mostrar texto de la cita -