0

Possible Duplicate:
jquery slideUp/slideDown functions not animating

I have multiple instances of slideup() and slidedown() in which they only show and hide but not with any animation. Here is a jsfiddle of a simple example of what I am experiencing.

http://jsfiddle.net/DkhSQ/

Thanks

Community
  • 1
  • 1
d.lanza38
  • 2,525
  • 7
  • 30
  • 52

2 Answers2

3

It's because you're trying to animate table elements. Table elements are not display:block, which animate() works best with.

Try wrapping the contents of what you are trying to animate in a div and animate the div instead...

jondavidjohn
  • 61,812
  • 21
  • 118
  • 158
danwellman
  • 9,068
  • 8
  • 60
  • 88
  • This is someone elses form, I'm just added this feature to it. Either way I am not well versed in css layout myself so a table it is for now. – d.lanza38 Mar 02 '12 at 17:47
3

As was already mentioned, table elements aren't supported efficiently enough by jQuery animations.

Based on your comment in another answer "This is someone elses form, I'm just added this feature to it. Either way I am not well versed in css layout myself so a table it is for now", you can implement it with minimal markup change by splitting the table into two, encapsulating the existingCustomer table in a div (due to it being "display:block" by default). Then animate on that div.

See this jsFiddle .

Goran Mottram
  • 6,244
  • 26
  • 41
  • Ahh, I put it in a div before but with the div wrapped around the 's. I didn't think to split the table itself into two different tables with a div around the one table. Thank you for your help, this should work perfectly. – d.lanza38 Mar 02 '12 at 18:20