我有一個JQuery Mobile響應表。調整瀏覽器窗口大小時,顯示更多/更少的列,因此一切正常。 http://jsfiddle.net/BamBamm/fe4ppftm/1/響應式表格在填充時失去響應能力
<table data-role="table" data-mode="columntoggle" class="ui-responsive" id="customerTable">
<thead>
<tr>
<th data-priority="6">customer ID</th>
<th>Customer name</th>
<th data-priority="1">First name</th>
<th data-priority="2">Address</th>
<th data-priority="3">City</th>
<th data-priority="4">PostalCode</th>
<th data-priority="5">Country</th>
</tr>
</thead>
<tbody id="customerTableBody">
<tr>
<td>10801</td>
<td>Some name</td>
<td>Some firt name</td>
<td>Some address</td>
<td>London</td>
<td>123456</td>
<td>United Kingdom</td>
</tr>
</tbody>
</table>
當我嘗試填充表動態不過,調整瀏覽器時,響應表不敏感了。我通過設置表體的html代碼填充表: http://jsfiddle.net/BamBamm/e2ukzy5z/1/
tableBody = "<tr><td>10801</td> <td>Some name</td> <td>Some firt name</td> <td>Some address</td> <td>London</td> <td>123456</td> <td>United Kingdom</td> </tr>";
$('#customerTableBody').html(tableBody);
我應該怎麼做才能使這項工作?
重複:http://stackoverflow.com/q/25346522/1771795 – Omar 2014-10-06 20:33:10