Come aggiungere <thead>
e <tbody>
utilizzando jquery?jquery aggiungi <thead> e aggiungi <tbody>
il problema è che il mio tavolo ha 1 o 2 file?
$('#myTable tr:has(th)').wrap('<thead></thead>');
<table id="myTable">
<tr><th>1</th><th>2</th><th>3</th><th>4</th></tr>
<tr><th>1</th><th>2</th><th>3</th><th>4</th></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
</table>
un [intestazione della tabella] (http://www.w3.org/wiki/HTML/Elements/th) ha in genere un 'thead' elemento come un fratello di 'tbody', non più teste all'interno di una riga. – jbabey
@jbabey non tutti i browser aggiungono un elemento thead. Aggiungono un tbody. – epascarello