How can I animate from current position to center using position({of:,my:,at:})?
Is there any way to automate the process, or do I have to animate the CSS properties manually?
How can I animate from current position to center using position({of:,my:,at:}) ? Is there
Share
Have you looked at .animate()?
Edit: Now that I understand what you are looking for a bit better, here is a jQuery plugin that I wrote to do this very thing.
Here’s a quick jsFiddle as an example.
I made the options a configurable object. Example:
EDIT: taking out the other code since it is no longer necessary and just cluttered things up. Cleaning up my new code. Fixed the offset parent positioning issues. Added a link to the git repository and jsFiddle using the latest version of the source.