简体   繁体   中英

Make a scrollable content with jquery datatable

is there any way to make a scrollable content with jquery datatable??

here is my script :

oTable = $('#tablex').dataTable
    ({
        "sDom": "<'scrollContent't>T<'fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix'lfr>t<'fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix'ip>",
        "bJQueryUI": true,
        "aoColumns": [
        null,
        null,
        { "sType": "formatted-num" },
        { "sType": "formatted-num" },
        { "sType": "formatted-num" },
        { "sType": "num-html" },
        { "sType": "num-html" }],
        "aLengthMenu": [[10, 15, -1], [10, 15, "All"]],
        "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
        /* Bold the grade for all 'A' grade browsers */
            var index = iDisplayIndex +1;
            $('td:eq(0)',nRow).html(index);
            return nRow;
        }
    });

when i tried it in firefox 3.6.19 it seems works fine, but when i tried it in firefox 5.0.1, it's doesn't works @.@ is there anyhing wrong with my script?? maybe anyone can help me?? thx..

Datatables supplies a way to set the size of the scrollable content...

"sScrollY": "200px",

http://www.datatables.net/examples/basic_init/scroll_y.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM