1

Does anyone know why jQuery has an uptick in the width percentage when using animate to scale down the width of an image. This only seems to happen when you are scaling down a div with a percentage based width that is within a div that is also using a percentage based width. See this example in it you can see that the square to the right drops down for a split second in the up tick. If you try ordering the animate changes on completion handlers there are similar results due to the uptick. The example is based on this other SO issue but is unanswered for my use case. I'm guessing it has something to do with 3rds and floats in ranging limits with percentages in jQuery, but maybe there is a simple solution out there. Thanks in advance for any help.

Check JSFiddle Link
4

1 回答 1

2

It does look like the totals for the left two columns might at one point be > 75%, which would push the last div to a new row.
You could declare a 'linear' animation. This seemed to work a little better for me. Maybe it does less/cleaner width calculations.

于 2012-11-08T16:33:19.597 回答