Ticket #7085 (closed bug: invalid)
Animate border-width
| Reported by: | Futjikato | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | unfiled | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Animating borderWidth only works when the style is declared as inlinestyle. I skeched the problem at jsFiddle.net ( http://jsfiddle.net/TkQM5/ ).
Change History
comment:1 follow-up: ↓ 2 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
comment:2 in reply to: ↑ 1 Changed 2 years ago by sebastian@…
Replying to dmethvin:
The borderWidth property is a shorthand property and returns a string that is a series of numbers separated by spaces. The .animate() method is only documented to animate properties that are numeric, such as borderLeftWidth.
The first example is incorrect, it tries to animate a "borderWidth" property: http://api.jquery.com/animate/#example-0
And it could look like working when the border is increasing because the value returned by $().css("borderWidth") is the empty string (""), so it animates from 0 (equal to "") to the value set in the options of the .animate() method.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

The borderWidth property is a shorthand property and returns a string that is a series of numbers separated by spaces. The .animate() method is only documented to animate properties that are numeric, such as borderLeftWidth.