在我使用:
设置ajaxenabled false之后<script type="text/javascript">
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = true;
});
</script>
我的可选表格不起作用
$('#usersListTable').selectable({ filter: 'tbody tr' });
$('td').click(function () {
row_index = $.trim($(this).parent().find(".username").html());
});
<table id="usersListTable" class="list">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Loginname)
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
@Html.DisplayNameFor(model => model.IsAdministrator)
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td class="username">
@Html.DisplayFor(modelItem => item.UserName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td class="centeredtd">
@GlobalHelpers.Checkbox(item.IsAdministrator)
</td>
</tr>
}
<tbody>
</table>
但是一旦我将ajaxenabled设置为true它开始工作,有没有办法让它与ajaxenabled false一起工作? 谢谢!
答案 0 :(得分:1)
solution here
:
我已经放了我的剧本:
$('#usersListTable').selectable({ filter: 'tbody tr' });
$('td').click(function () {
row_index = $.trim($(this).parent().find(".username").html());
});
里面
$(document).on('pageinit', function(){
});