Search code examples
javascriptmootoolsmootools-fx

mootools FX.slideOut collapses table row


I'm borrowing some code from a David Walsh tutorial on animated delete with mootools.

When I use the Mootools FX.slide on a table row, it sort of collapses the row horizontally before sliding it up, which is not the desired effect.

There's a fiddle here if you'd like to take a look-- http://jsfiddle.net/gNvvT/

How can I make this effect a smooth slide vertically, rather than collapsing left, then up?

Thanks!


Solution

  • I'm afraid Fx.Slide can't work with table rows, but only with block elements.
    As Dimitar Christoff said to you.

    I've modified your fiddle to get around this problem. From the code you posted, it seems you are quite practical with Mootools, so I just wrote some comments on the code. I'm sure you will get the trick.

    http://jsfiddle.net/gNvvT/5/

    Let me know if it works on your real world application!

    Edit. There was some useless code I left from previous tests. I removed it and I updated the fiddle URL.