1
0
mirror of https://github.com/mbirth/wiki.git synced 2024-12-25 23:04:06 +00:00
wiki.mbirth.de/_includes/table_freeze_first.html

9 lines
331 B
HTML
Raw Permalink Normal View History

<script type="text/javascript">
// https://stackoverflow.com/questions/45071085/freeze-first-row-and-first-column-of-table
$(document).ready(function() {
$('.freeze-first-col tbody').scroll(function(e) {
$(this).find('td:nth-child(1)').css("left", $(this).scrollLeft()-5);
});
});
</script>