Relative percentage values (+= / -=) work in .animate but not in .css #1711
Comments
|
Original discussion: Changed 12 months ago by timmywil Priority changed from undecided to blocker comment:2 in reply to: ↑ description Changed 11 months ago by francomalatacca Replying to jwagner@…:
The problem is that style function that is called by css function doesn't care about percentage. A fix could be by adding support for this by checking if there is the % symbol at the end of value. If so it should compute the percentage of the parent width. I fixed the bug with something
Thanks. Franco comment:3 Changed 10 months ago by gibson042 Owner set to gibson042 Milestone changed from 1.11/2.1 to 1.11.1/2.1.1 This is reproducible for other unit "em" There are other not so popular units like "cm","in" etc. Need fix for them too comment:6 Changed 6 months ago by dmethvin Milestone changed from 1.11.1/2.1.1 to 1.12/2.2 |
|
@gibson042 can you get to this soon? |
Originally reported by jwagner: http://bugs.jquery.com/ticket/14484
...moves the item by 50 pixel instead of 50%, while
...works as expected (adds 50%).
The docs suggest that .css and .animate should behave identically ( http://api.jquery.com/css/):
If "similar" should really mean "similar" but not identical, it would help to give a hint in the docs that relative percentage values are not supported by .css.
The problem shows up in current Chrome, Firefox and IE10.
Fiddle to reproduce: http://jsfiddle.net/2VGgg/
The text was updated successfully, but these errors were encountered: