0

次を使用して 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 で機能させる方法はありますか? ありがとうございました!

4

1 に答える 1

1

数時間グーグルした後、私は見つけましたsolution here

私は自分のスクリプトを入れました:

$('#usersListTable').selectable({ filter: 'tbody tr' });
    $('td').click(function () {
        row_index = $.trim($(this).parent().find(".username").html());
    });

中身

$(document).on('pageinit', function(){

});
于 2013-12-01T11:55:19.310 に答える