I've been attempting to make the thead
of this table stay fixed when scrolling, but so far, I haven't had any success.
This is the JavaScript code I attempted to use:
<script>
document.getElementById("tablepress-10").addEventListener("scroll", function() {
var translate = "translate(0," + this.scrollTop + "px)";
this.querySelector("thead").style.transform = translate;
});
</script>
Any suggestions or advice?