#13855 closed bug (fixed)
Problems animating line-height property
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 2.0.1 |
Component: | effects | Version: | 2.0.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a table with four rows, whose line-height I want to animate with jQuery. I use the following code to shrink and hide the rows:
$("table tr").animate({ 'line-height': 'hide' }, 5000);
But instead of starting to shrink the rows from their current height, it first makes them really huge, and then starts shrinking. Press the Hide button in this fiddle to see it in action: http://jsfiddle.net/YzCzd/1/
The root of the problem is that jQuery considers line-height a number property, and therefore does not specify the unit when setting the value. It is possible to correctly use hide/show for line-height with the following workaround: $.cssNumberlineHeight? = false;
Change History (4)
comment:1 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Resolution: | duplicate → fixed |
---|
Fix #13855: line-height animations. Close gh-1265.
Changeset: 3971c2ebb2e6729fe80bac4ee7b91bc02f26486f
comment:3 Changed 10 years ago by
Milestone: | None → 2.0.1 |
---|
comment:4 Changed 10 years ago by
Component: | unfiled → effects |
---|---|
Priority: | undecided → low |
Duplicate of #13472.
A ticket is open to document cssNumber. https://github.com/jquery/api.jquery.com/issues/164