JSFiddle - React, Tailwind, and code Playground

by djmartini

HTML

<script src="http://1-ye.ru/jquery.scrollTableBody-1.0.0.js"></script>
<div class="table-wrap">
    <table id="example" cellpadding="0" cellspacing="0" border="1">
        <thead>
            <tr>
                <th>Nissan</th>
                <th>Alfa Romeo</th>
                <th>Opel</th>
                <th>Honda</th>
                <th>Koeninseg</th>
                <th>Lamborgini</th>
                <th>Chrysler</th>
                <th>Koeninseg</th>
                <th>Lamborgini</th>
                <th>Chrysler</th>
                <th>Daewoo</th>
                <th>Daewoo</th>
                <th>Hammer</th>
                <th>Jeem</th>
                <th>Land Rover</th>
                <th>Jaguar</th>
                <th>McLaren</th>
                <th>Bugatti</th>
                <th>Aston Martin</th>
                <th>Mersedes</th>
                <th>Honda</th>
                <th>Koeninseg</th>
                <th>Lamborgini</th>
                <th>Chrysler</th>
                <th>Daewoo</th>
                <th>Hammer</th>
                <th>Jeem</th>
                <th>Land Rover</th>
                <th>Jaguar</th>
                <th>McLaren</th>
            </tr>
        </thead>
        
        <tfoot>
            <tr>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150 000</th>
                <th>150...

CSS

table {
    width: 100%;
}
th {
    background: #ccc;    
}
th, td {
    white-space: nowrap;
}

JavaScript

$('#example').scrollTableBody();