This version is old school.
Please find jQuery plugins on npm.
Plugin for freezing table rows and columns
by Bryan Cua
$.fn.tableFreeze is a lightweight jQuery plugin that allows freezing of rows and columns. Scrolling can be enabled. Both rows and columns can be frozen. Rows to be frozen should be placed in 'thead'.