I have a table like this:
<table id="mi_tabla">
<tr>
<th></th>
<th style="display: none;"></th>
<th></th>
<th></th>
</tr>
<tr>
<td></td>
<td style="display: none;"></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td style="display: none;"></td>
<td></td>
<td></td>
</tr>
</table>
and I want to remove those columns that have display none, how can I do it?
Thank you!!
In a single line you can do it with CSS Selectors
In this example that I leave you, I select all the elements that have "display none" and then I remove them.
You can use a jQuery selector that looks for elements with the style
display: none
. If you inspect the table, you will see that the elements have been removed: