после того, как я установил 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? Спасибо!
после googling несколько часов я нашел solution here
:
Я поставил свой сценарий:
$('#usersListTable').selectable({ filter: 'tbody tr' });
$('td').click(function () {
row_index = $.trim($(this).parent().find(".username").html());
});
внутри
$(document).on('pageinit', function(){
});