how to use bootstrap classes in row

how to use bootstrap classes in row

AmanatAmanat Posts: 1Questions: 0Answers: 0

hi i am using bootstrap in datatables using ajax method. But i am not able to use bootstrap classes in row like
<tr class="active">
<tr class="success"> etc,
Also how can i resize the th size.

$(document).ready(function() {
$('#example').dataTable( {
"ajax": {
"url": "p.php",
"dataSrc": ""
},

    "columns": [
        { "data": "S_No" },
        { "data": "Filename" },
        { "data": "Speed" },
        { "data": "Progress" },
        { "data": "Filesize" },
        { "data": "Auto Delete" },
        { "data": "Links" }
    ]
} );

setInterval( function () {
$('#example').DataTable().ajax.reload(null, false);
}, 5000 );
});

</script>

Replies

  • matthttammatthttam Posts: 40Questions: 2Answers: 0

    Here is some code I use to create search fields:

    html_table.find('tfoot th').each( function() {
                var title = html_table.find('thead th').eq( $(this).index()).text();
                $(this).html( '<input type="text" placeholder="Search '+title+'" />');
            });
    

    Perhaps you can re-engineer this to search for tbody tr and maybe do $(this).addClass("active") etc...

    Hope that helps.

This discussion has been closed.