我需要能够使用 jquery mobile滚动表格元素。
例如,现在我在表中有很多数据。我的页面显示了 20 条记录,我知道有 25 条记录,所以当我想垂直滚动时,我的整个页面都在移动,而不是我的表应该移动。
我正在为表格使用 DataTables 插件。
代码:
<table id="level" width="100%" border="1" cellspacing="2" cellpadding="5" >
                <thead>
                    <tr class="even">
                        <th></th>
                        <th><span class="time_var">Time</span></th>
                        <th><span class="id_level_var">ID Level</span></th>
                        <th><span class="level_var">Level</span></th>
                    </tr>
                </thead>
              <tbody>
              </tbody>
        </table>
和 javascript:
$(document).ready(function() {
        oTable = $('#level').dataTable( {
            "bLengthChange": false,
                    "aaSorting": [[1,'asc']],
            "bProcessing": true,
            "bServerSide": true,
            "sPaginationType": "full_numbers",
            "sScrollY": "500px",
            "bDeferRender": true,
            "sAjaxSource": "table.php"
        } );