0

I want to implement an animation where one dom element is moved into another, scales down and finally disappears. Consider the animation I want to show to user when he adds an item to his shopping cart. Is there a plugin to implement this or a simple jquery script may be?

Here is something along the lines of what I want. - http://pastebin.me/638d1947c4d20da4eccd6542887caf27

Here the element is being append to another dom element. I don't want to append it, just animate is what I am looking for.

vikmalhotra
  • 9,981
  • 20
  • 97
  • 137
  • 2
    A duplicate to your question : http://stackoverflow.com/questions/1279957/jquery-how-to-move-an-element-into-another-element . Also you can add `.animate()` function. You won't require a plugin for this – Suraj Oct 25 '11 at 04:26
  • this is not what I want. I just want to animate the moving. I don't want to append the dom element to another. – vikmalhotra Oct 25 '11 at 04:33

1 Answers1

1

It turned out to be quite simple actually. I implemented something like this...

$('#HideDiv').animate({
    opacity: 0,
    left: '+=50',
    width: 0
}, "slow", function() {
    $(this).hide();
});
vikmalhotra
  • 9,981
  • 20
  • 97
  • 137
  • This is not what was asked in the question, It clearly says you wanted to move (as in shift) the DOM element – Suraj Oct 25 '11 at 07:34
  • @tunetosuraj - this is a workaround that I figured was easier to implement since the dom elements are adjacently located. for a better demo of what I want, I have edited my question. – vikmalhotra Oct 25 '11 at 09:04