I have a div absolutely positioned at top: 0px and right: 0px, and I would like to use jquery\'s .animate() to animate it from it\'s c
If you know the width of the child element you are animating, you can use and animate a margin offset as well. For example, this will animate from left:0 to right:0
CSS:
.parent{
width:100%;
position:relative;
}
#itemToMove{
position:absolute;
width:150px;
right:100%;
margin-right:-150px;
}
Javascript:
$( "#itemToMove" ).animate({
"margin-right": "0",
"right": "0"
}, 1000 );