I searched for this but the answer I assumed would be the solution to my problem isn’t working. This seems awfully trivial considering I’ve dealt with things much more complicated in the past, but I can’t for the life of me figure out what’s going wrong.
$('.link').click(function(e){
e.preventDefault();
$.scrollTo('2000px', 300);
}
this code, in Chrome and Safari, jumps to the top of the page before scrolling 2000 pixels. I’ve been reading through other lists that they had other events that were the problem, but this is the ONLY javascript code (with the exception of jQuery and scrollTo includes) on the test page I’m working on.
I was able to duplicate this bug with jQuery 1.5.1 and jQuery.SCrollTo version 1.4.2 by enabling the “Screen Capture (by Google) – Version: 4.0.1” extension in Google Chrome 11.0.696.34 beta.
Simply disabling that extension and refreshing the page resulted in the bug going away under those same circumstances.