benbarnett/jQuery-Animate-Enhanced — pull request #74 by lelolo (2012-03-09 09:24:57+00:00)
Title: I tried to add a "unit management"

Before the change, if asked animated value unit wasn't 'px', but for example "%" or "em", unit was replaced by "hard coded" 'px' unit : initial "%" call was transformed and animate calls with value lik "15%" became "15px".

I needed to keep the correct unit when translating, so I added a _getUnit private method, as well as a 'valUnit' variable, which is set through a_getUnit call from existing '_cleanValue' calls.

I then replaced all "hardcoded" 'px' with the valUnit variable.

It seems to do the trick for me, so perhaps is there something in that minor adjustment that could help someone else?