I animate a div that is absolutely positioned. The "upper" value is dynamically untwisted, so I need to use jquery to animate -20px any value of the "upper" dyanmic value.
$("#element").animate({"top" : +-20});
Obviously this is not true, but I just need to subtract 20 from any "top" value that the #element element already has. Can I do this using the syntax above?
For example, if #element has a vertex: -300px, I need the final result: -320px.
source share