All I see is a brief flash at the end of the animation, not very
noticeable, both in IE and FF. I suppose there isn't a way to avoid
that as you are removing/appending the elements. Maybe fixing the
$targetNode position with position:absolute before the after/before
call, that should avoid some of the flickering.

On Mar 19, 9:28 am, ragsyboy <james.wr...@gmail.com> wrote:
> 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