How to create mutable table in html using scroll using jQuery?

I want to create a table in HTML that has resizable columns. I also want the scrollbars to be in the table, but the table title should remain fixed while scrolling.

Please, help.

+6
source share
2 answers

www.tablefixedheader.com

Just create basic valid HTML as shown below. But note that the hierarchy should be:

- table > thead > tr > th - table > tbody > tr > td 

Example for repeated column values

  $('#4').fixheadertable({ caption : 'My employees', colratio : [50, 150, 150, 150, 220, 150], height : 200, width : 800, zebra : true, resizeCol : true, minColWidth : 50 }); 
+3
source

I think this is your decision. see demo in jsfiddle. if you want to download data from the server, set savedStateLoad: true . otherwise ignore the ajax part, in your case just set savedStateLoad: false

The source code for the code is here , thanks to them.

+2
source

Source: https://habr.com/ru/post/915356/


All Articles