Nathan Smith
Nathan Smith

Reputation: 3

jquery animate acting strangely

This is for a non-profit educational web resource mainly for teachers in schools, we get 2 million hits a month, so your help will definitely be hugely appreciated since I am the only web developer for this under-budgeted, highly-trafficked website!!

Basically, I have an arrow that points to the page that you're on. When you click on a new item, the arrow slides to show you what section you're on. Now, the arrow ends up in the right place, but everytime you change it, it seems to slide to the very left FIRST, and then it will go to the correct place. I've tried all sorts of tweaks and options to the code (and different browsers, etc etc) at this point... And everytime it has this funny behavior. Can anyone give me some good advise? This is so annoying...

Here is the stripped-down page http://myhero.com/go/create/stack.asp

The only menu options that work are "Preview" and "Visitor Intro" so try clicking between those two items and you'll see what I mean.

THANK YOU

Upvotes: 0

Views: 71

Answers (2)

frostmatthew
frostmatthew

Reputation: 3298

It seems you're calling resetMs() as the first line in the jumpTo(section) function....and it looks like resetMs() first line sends it to the left $("#arr").animate({left: '245px'});

Upvotes: 0

SLaks
SLaks

Reputation: 888167

Before animateing in jumpTo, you're moving it back to the left in resetMS.
Either don't call resetMS or call stop in jumpTo.

Upvotes: 1

Related Questions