Ticket #10229 (closed enhancement: wontfix)
Relative value syntax (for .css() and .animate()) should support more mathematical operations
|Reported by:||mtaby@…||Owned by:|
Description (last modified by rwaldron) (diff)
Right now, you can set a css property relative to a current value. However, I think jQuery ought to support multiplication and division as well.
Use-cases for this vary, in my case, I want to set the scale (3d/2d transformation) relative to its current position, but scale is a multiplier, not a static value; You don't "add one" to a scale, you "multiply by 1.01".
Another use-case is when someone wants to double/triple the current value, same with halving, dividing, etc.
From my casual peek at the code, it seems like this would involve small changes to the rrelNum regex in css.js and some corresponding changes to the style() method.
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to css