javascript - Datatable freezed header -


datatable fixed header when scrolling , down link

$(document).ready(function() {         $('#student_datatable').datatable( {             fixedheader: true,             scrollx: true,             bsort : false         } );     } ); 

fixedheader: true doesn't work. can me ?

the link fiddle in question has nothing datatables. uses css implement fixed header functionality regular html table. in case css useless.

for datatables use fixedheader plugin

first of need reference adding html(in case not included):

<script src="https://cdn.datatables.net/fixedheader/3.1.1/js/datatables.fixedheader.min.js"></script>  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/fixedheader/3.1.1/css/fixedheader.datatables.min.css"> 

then

$('#student_datatable').datatable({     fixedheader: true }); 

will work expected (working fiddle)


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -