set Spalte-Breite mit jQuery

Ich habe eine html Tabelle mit format

<div id="divOutputWindow">
<table>
<tbody>
<tr>
<td>/* Set Width 10 Px */</td>
<td>/* Set Width 20 Px */</td>
</tr>
<tr>
/* Same for all tr */
</tr>
</tbody>
</table>
</div>

d.h. die ersten td hat eine Breite von 10 px weiter td-15 px nächste td-20 px...ebenfalls

Was ich Versucht habe, ist

$('#divOutputWindow').find('table').$('tbody > tr > td').css('width', '10px');

InformationsquelleAutor Shaggy | 2012-11-21

Schreibe einen Kommentar