Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#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:
Blocked by: Blocking:

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 (2)

comment:1 follow-up: Changed 5 years ago by dmethvin

  • Resolution set to invalid
  • Status changed from new to closed

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.

comment:2 in reply to: ↑ 1 Changed 5 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.

Note: See TracTickets for help on using tickets.