0

我有这个脚本与两个单独的表一起使用:

<script>

$(document).ready(function() {
    tbl = $('#listtableB').dataTable( {
        "bStateSave": true,
        "bJQueryUI": true,
        "aLengthMenu": [ [ 10, 25, 50, 100, 400, 800, -1 ], [ 10, 25, 50, 100, 400, 800, 'Összes' ] ],
        "sPaginationType": "full_numbers",
        "oLanguage": {
                "sUrl": "lang/datatables_hu.txt"
            },
         "aoColumns": [
            { "bSortable": true },
            { "bSortable": true },
            { "bSortable": true },
            { "bSortable": false },
        ]
        })
    tbl.fnSort( [ [0,'asc'] ] );


        newsl = $('#listtableD').dataTable( {
        "bStateSave": true,
        "bJQueryUI": true,
        "aLengthMenu": [ [ 10, 25, 50, 100, 400, 800, -1 ], [ 10, 25, 50, 100, 400, 800, 'Összes' ] ],
        "sPaginationType": "full_numbers",
        "oLanguage": {
                "sUrl": "lang/datatables_hu.txt"
            },
         "aoColumns": [
            { "bSortable": true },
            { "bSortable": true },
            { "bSortable": false }
        ]
        })
    newsl.fnSort( [ [0,'asc'] ] );


    })


</script>

但是只有第一个表发生变化,第二个保持正常表,但是如果我删除第一个数据表设置,第二个就变了。为什么它不适用于这两个表?

4

0 回答 0