div will slideDown but it won't slideUp

后端 未结 2 532
深忆病人
深忆病人 2020-12-21 00:11

I am attempting to show and hide a series of divs using toggle, slideUp and slideDown. I am able to get the div to slideDown but I can\'t get it to slideUp. I\'ve used this

相关标签:
2条回答
  • 2020-12-21 01:01

    I posted this advice as a comment, and it helped to fix the problem so I am posting it again here:

    When slideUp/slideDown animations only work one way, it is often a positioning bug. Either the element you are animating needs to be set to position:relative or the children of the element have a float applied to them and are not giving the parent element true height.

    I would try adding float:none to the table. If that doesn't work try adding position:relative to the div#HiddenVehicles.

    0 讨论(0)
  • For those without float/positioning problems, I found that upgrading from jQuery 1.10 to 1.11 solved the problem.

    0 讨论(0)
提交回复
热议问题