我使用jQuery mobile 1.3.0版本:"Uncaught Error:没有这样的方法'刷新'表窗口小部件实例"但该文档说它可以使用:
更新单元格中的标签.
$( myTable ).table( "refresh" );
Run Code Online (Sandbox Code Playgroud)
如何解决问题?有没有办法让单元格中的标签刷新?
<div data-role="content" >
<table id="tableProp" data-role="table" data-mode="Reflow" class="ui-body-d ui-shadow table-stripe ui-responsive" data-column-popup-theme="a">
<thead>
<tr class="ui-bar-d">
<th data-priority="2" style="text-align: center">Test1</th>
<th style="text-align: center">Test2</th>
<th data-priority="3" colspan=2 style="text-align: center">Test3</th>
</tr>
</thead>
<tbody id="tbProp">
</tbody>
</table>
<a href="javascript:clickBtn()">Table test</a>
</div><!-- /content -->
</div><!-- /page -->
<script>
function clickBtn()
{
var tb = $('#tbProp'),
newRow = '<tr><th style="text-align: center;vertical-align:middle">' + 'Test11' + '</th> <td style="text-align: center;vertical-align:middle">' + '23.3'+ '</td><td style="text-align: center;vertical-align:middle"><a href="#" data-role="button" …Run Code Online (Sandbox Code Playgroud)