I have implemented jQuery Datatables to display a table and made it mobile responsive. However, I am facing an issue where I want to completely hide the table headers when viewing the table on a mobile device, and show them again on a normal screen.
Specifically, I have successfully hidden the headers using CSS but when I enable vertical scrolling for the table, the headers become visible on mobile view which is not desired.
Here is an example of the table code with repeated data for testing:
<table id="no-more-tables">
<thead>
<tr>
<th>Code</th>
<th>Company</th>
<th class="numeric">Price</th>
<th class="numeric">Change</th>
<th class="numeric">Change %</th>
<th class="numeric">Open</th>
<th class="numeric">High</th>
<th class="numeric">Low</th>
<th class="numeric">Volume</th>
</tr>
</thead>
<tbody>
<tr>
<td data-title="Code">AAC</td>
...
</script>