Hi,

I'm trying to add animation to the .before()/.after() action on some
dom nodes and getting visual glitches which get seriously worse on
html 'heavy' pages.

I've put together a quick n' dirty example here: http://jsbin.com/ahupa/edit
If you click the down button in the first div you'll see them swap
round with animation, then the change is reflected in the DOM.

i'm getting the offsets of the clicked div and it's adjacent div,
animating the difference so they slide past each other, then it
removes the leftover styles applied by the animation, then fires
the .before() or .after() depending on the required direction.
But no matter what order i do this (remove styles before/after dom
change) I always see for a split second the dom nodes swapped round
but with the style remnants from the animation still there - meaning
their all over the place for a second. This gets worse the heavier the
page is.

This is kinda hard to explain but hopefully your browser/machine is
slow enough to show the problem in the example :S

Any ideas? am i tackling this the wrong way?

Thanks in advance,

James

Reply via email to