jquery ui在ajaxenabled false之后不工作
使用以下命令将ajaxenabled设置为false后:jquery ui在ajaxenabled false之后不工作,jquery,jquery-ui,razor,jquery-mobile-ajax,Jquery,Jquery Ui,Razor,Jquery Mobile Ajax,使用以下命令将ajaxenabled设置为false后: <script type="text/javascript"> $(document).bind("mobileinit", function () { $.mobile.ajaxEnabled = true; }); </script> $(文档).bind(“mobileinit”,函数(){ $.mobile.ajaxEnab
<script type="text/javascript">
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = true;
});
</script>
$(文档).bind(“mobileinit”,函数(){
$.mobile.ajaxEnabled=true;
});
我的可选表格不工作
$('#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>
$('#usersListTable')。可选({filter:'tbody tr'});
$('td')。单击(函数(){
行索引=$.trim($(this.parent().find(“.username”).html());
});
@DisplayNameFor(model=>model.Loginname)
@DisplayNameFor(model=>model.Email)
@DisplayNameFor(model=>model.IsAdministrator)
@foreach(模型中的var项目)
{
@DisplayFor(modelItem=>item.UserName)
@DisplayFor(modelItem=>item.Email)
@GlobalHelpers.Checkbox(item.IsAdministrator)
}
但是,一旦我将ajaxenabled设置为true,它就会开始工作,有没有办法让它与ajaxenabled false一起工作?
谢谢大家! 在谷歌搜索了几个小时后,我发现: 我已经把我的剧本:
$('#usersListTable').selectable({ filter: 'tbody tr' });
$('td').click(function () {
row_index = $.trim($(this).parent().find(".username").html());
});
里面
$(document).on('pageinit', function(){
});