小编ash*_*91d的帖子

Datatables.net ScrollX | Header and Data column width issues

I'm trying to create wrapper for datatables.net table component, which create and enable features datatables based on classes defined in table.

$('table.data-table').each(function() { 
    var props = {};
    if ($(this).hasClass('select') && $(this).hasClass('multi'))
        props.select = 'multi';
    else if ($(this).hasClass('select')
        props.select = 'single';
    if ($(this).hasClass('long-table')
        props.scrollX = true;
    ...
    ...
    ...
    $(this).DataTable(props);
});
Run Code Online (Sandbox Code Playgroud)

Like you see above based on classes defined in table DataTable's features enabled for all HTML tables.

Test Case 1: Table should fill it's container.

Test case 2: Scrolling should …

css jquery scroll datatables

6
推荐指数
1
解决办法
4392
查看次数

标签 统计

css ×1

datatables ×1

jquery ×1

scroll ×1