I recently pulled some custom script off the internet that makes my headers sticky on a list. I put it in a script editor. I initially thought it didn't work, but now I noticed that the script only works when I'm in edit page mode. I used the process and script provided from here http://robertmcquaig.com/sharepoint/sharepoint-sticky-headers/
Try adding the
<script> tag references, like this:
Also see these posts:
keep in mind that the script will not run when in post back, so, you have to save the page (stop editing) and then press Enter in the url address bar in your browser. Refresh with F5 may still not work!