Side navigation
#4860 closed bug (wontfix)
Opened July 07, 2009 09:04AM UTC
Closed April 17, 2011 07:52PM UTC
Last modified March 15, 2012 05:51PM UTC
slideToggle not working with height: auto and all floating elements
Reported by: | capsule | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.4.4 |
Keywords: | slideToggle slideUp float height needsreview | Cc: | |
Blocked by: | Blocking: |
Description
Hi,
If you apply a slideToggle() effect on an element which height is defined as "auto" in your CSS file and all contained elements are floating (in my case, one element floating left and another floating right), the slideDown works but not the slideUp (it disappear and then slideDown again). I guess this is because the container on which I try to apply the effect has no height due to the floating only elements.
If I define a fixed height on the container, the toggle effect works.
Btw, this is affecting the "slideUp" effect as well (not working, for the same reason I guess).
Maybe jQuery should calculate the height of the container based on its children's height?
HTH,
Regards.
Attachments (0)
Change History (7)
Changed June 13, 2010 01:18PM UTC by comment:1
component: | unfiled → fx |
---|
Changed June 13, 2010 01:18PM UTC by comment:2
summary: | slideToogle not working with height: auto and all floating elements → slideToggle not working with height: auto and all floating elements |
---|
Changed November 20, 2010 09:46PM UTC by comment:4
keywords: | slideToggle slideUp float height → slideToggle slideUp float height needsreview |
---|---|
milestone: | 1.4 |
priority: | major → low |
version: | 1.3.2 → 1.4.4 |
Changed February 28, 2011 08:51AM UTC by comment:5
I've found similar behaviour when applying slideUp/slideDown effects to block elements floated:
if element is directly floated (I mean, not inheriting floating from ancestor element), slideUp/slideDown effects only hide/show the element, but the animation is not shown.
if the floating is moved upside to an ancestor slideUp/slideDown works fine.
I hope it helps to track and fix this problem.
Changed April 17, 2011 07:52PM UTC by comment:6
milestone: | → 1.next |
---|---|
resolution: | → wontfix |
status: | new → closed |
I don't think this is something we want to change. There are many resources for doing clearfixes and jQuery is correctly animating the height of 0.
Changed March 15, 2012 05:51PM UTC by comment:7
A similar behavior occurs when using min-height instead of height. The target div just appears and disappears without showing the sliding effect.