#7345 closed enhancement (fixed)
Support relative values for $().css()
Reported by: | brandon | Owned by: | danheberden |
---|---|---|---|
Priority: | low | Milestone: | 1.6 |
Component: | css | Version: | 1.4.3 |
Keywords: | relative css | Cc: | |
Blocked by: | Blocking: |
Description
Pulled from: http://github.com/paulirish/lazyweb-requests/issues/issue/10
Relative values are usable in jQuery.fn.animate, why not jQuery.fn.css? Help me stop using this work around:
$('elem').animate({ 'left' : '+=10px' }, 0);
Attachments (1)
Change History (14)
comment:1 Changed 12 years ago by
Component: | unfiled → css |
---|---|
Priority: | undecided → low |
Changed 12 years ago by
Attachment: | 7345.patch added |
---|
comment:2 Changed 12 years ago by
Added patch to github with pull request: http://github.com/jquery/jquery/pull/78
comment:3 Changed 12 years ago by
Keywords: | relative css added |
---|---|
Priority: | low → high |
Status: | new → open |
As far as enhancements go, I think this is a great one. Thanks for the pull request.
comment:4 Changed 12 years ago by
Priority: | high → low |
---|
comment:5 Changed 12 years ago by
Owner: | set to brandon |
---|---|
Status: | open → assigned |
comment:7 Changed 12 years ago by
snover is interested in seeing this patch done a bit more DRY. have to generalize the effect.js aspect of this to share between the two. https://github.com/jquery/jquery/pull/78
anyone can feel free to tackle that. :)
comment:8 Changed 12 years ago by
Owner: | changed from brandon to ajpiano |
---|
comment:9 Changed 12 years ago by
Milestone: | → 1.6 |
---|
comment:10 Changed 12 years ago by
Owner: | changed from ajpiano to danheberden |
---|
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 Changed 12 years ago by
Sorry you're having troubles - sounds like something else might be the problem though? Please provide a test case for the odd behaviour you're experiencing using jsfiddle.net
I made one: http://jsfiddle.net/danheberden/tGNZm/
Since jsfiddle.net doesn't have 1.6.1 on the list, I just added it via the resources area: https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js
Patch + tests