How to do that on mobile was the structure of the table: the header table of item?

I have a table (it is table, div with display:table not accepted). This is an adaptive table, on small devices td, th is display: block. But in this case, the table header is reflected once at the top, not before each td class="item". How to do that on mobile was the structure of the table: the header table of item?

https://codepen.io/malinosky/pen/ypyMJR
June 10th 19 at 15:26
1 answer
June 10th 19 at 15:28
Little lasted)) But almost))
https://codepen.io/anon/pen/zpxXBb

Find more questions by tags jQueryHTMLJavaScript