It depends on what you want to achieve. If only reset all tds to the default width at once, just use width: auto . However, if you want to revive it there, it is a little more complicated. You need to keep the width of each column in a variable and then animate it.
Here is an updated example from jsFiddle: http://jsfiddle.net/k2Pqw/5/
$(document).ready(function () { var blaW = $('#bla').width(), beW = $('#be').width(); $("#bla").animate({ width: "500px" }, 1000, function () {}) .animate({width: blaW+'px'}, 1000, function () {}); $("#be").delay(2500) .animate({ width: "500px" }, 1000, function () {}) .animate({width: beW+'px' }, 1000, function () {}); });
And html:
<table id="myTable"> <tr> <td style="background-color:Aqua;">salamander</td> <td style="background-color:Red;" id="bla">s</td> <td style="background-color:Black;" id="be">s</td> <td style="background-color:Green;">s</td> </tr> </table>
source share