Reputation: 2149
I'm using the scrollTo plugin (http://flesler.blogspot.com/2007/10/jqueryscrollto.html) to scroll to a specific anchor in my page. Now I would like to be able to specify an anchor to scroll to, so I tried this:
$('a[name="anchorname"]').scrollTo();
But that doesn't seem to work. Does anyone know how to do this?
Upvotes: 2
Views: 1283
Reputation: 359776
I'm pretty sure you're looking for
$.scrollTo('a[name="anchorname"]');
Demo: http://jsfiddle.net/mattball/davUw/
Upvotes: 2