Skip to main content

Bug Tracker

Side navigation

#10780 closed bug (duplicate)

Opened November 13, 2011 08:44PM UTC

Closed November 13, 2011 08:45PM UTC

Last modified November 13, 2011 08:45PM UTC

.animate() does not work correctly for percentages

Reported by: egonzalez0787 Owned by:
Priority: undecided Milestone: None
Component: effects Version: 1.7
Keywords: Cc:
Blocked by: Blocking:
Description

If I have this:

<div id="outer">
  <div id="inner">
  </div>
</div>

With this css:

div#outer {
  height: 200px;
  width: 120px;
}
div#inner {
  height: 0;
  width: 100%;
}

And try to do this:

$('div#inner').animate({height: '100%'});

When the animation is finished, what I get is a '100px' height instead of the '100%' expected. This works fine in version 1.6.4 and 1.6.3.

My workaround for 1.7 was something like this:

$('div#inner').animate({height: $('div#outer').height() + 'px'});
Attachments (0)
Change History (2)

Changed November 13, 2011 08:45PM UTC by timmywil comment:1

component: unfiledeffects
resolution: → duplicate
status: newclosed

Changed November 13, 2011 08:45PM UTC by timmywil comment:2

Duplicate of #10669.