我一直在使用jQuery Mobiles新的响应表。我有3张桌子,其中2张按预期完美地工作,但由于某种原因,最后一张桌子拒绝工作。
以下是代码:
<table data-role='table' id='TableProfile' class='ui-responsive table-stroke'>
<thead>
<tr>
<th data-priority='persist'>#</th>
<th data-priority='persist'>Title</th>
<th>Author</th>
<th>Publisher</th>
<th>Edition</th>
<th data-priority='3'>Condition</th>
<th data-priority='2'>Price</th>
<th>Sold</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Thomas Calculus Early Transcendentals</td>
<td>MD.Weir, GB.Thomas Jr, J. Hass, FR.Giordano</td>
<td>Brooks/Cole</td>
<td>12</td>
<td>5</td>
<td>750</td>
<td><input type='button' value='Sold' name=70/></td>
</tr>
<tr>
<td>2</td>
<td>Thomas Calculus Early Transcendentals</td>
<td>MD.Weir, GB.Thomas Jr, J. Hass, FR.Giordano</td>
<td>Brooks/Cole</td>
<td>10</td>
<td>4</td>
<td>1000</td>
<td><input type='button' value='Sold' name=73/></td>
</tr>
</tbody>
</table>
我正在使用jQuery Mobile版本1.3,但我确定为什么这个表不起作用
答案 0 :(得分:1)
我确定有一个错误,因为这个功能是新的。现在解决我的问题的方法是完全关闭我正在工作的标签,然后再次打开网站并且它有效。刷新页面无法解决问题。
答案 1 :(得分:1)
您确定要使用的是jQuery&gt; 1.7? jQuerymobile需要jQuery 1.7或更高版本才能运行。
我已经尝试过它似乎有效。
标准的做法是:
<table data-role="table" id="my-table" data-mode="reflow">
<thead>
<tr>
<th>Rank</th>
<th>Movie Title</th>
<th>Year</th>
<th><abbr title="Rotten Tomato Rating">Rating</abbr></th>
<th>Reviews</th>
</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td><a href="foo.com" data-rel="external">Citizen Kane</a></td>
<td>1941</td>
<td>100%</td>
<td>74</td>
</tr>
</tbody>
</table>
代码的工作示例:http://jsfiddle.net/AYSJZ