For reasons which are somewhat unavoidable (lots of legacy code, compatibility, design needs) I have the following problem: I have two tables, one directly below the
I couldn't get the accepted answer to work directly, so I reworked it a bit, just in case it doesn't work for anyone else.
$('.table1 tr:eq(1) td').each(function (i) { var _this = $(this); $('.table2 tr:eq(1) td:eq(' + i + ')').width(_this.width()); });