I need to move an image div to some other div with effects and animation.
How I can do this?
My Code:
var div2Pos = $("#marque").position();
var div2Width = $("#marque").css("width");
var div2Height = $("#marque").css("height");
$("#img-div").animate({'left':div2Pos.left, 'width':div2Width, 'height':div2Height}, 1000);
where ‘#marque’ is my destination div and ‘#image-div’ is my original div
Thanks in advance
you need to make the element absalut animate it to the absalout position of the destnation and when anaimation end remove and append the elemt and remove absalut position
see fiddler example
http://jsfiddle.net/yamsalm/3U52z/