I have the following example setup
What I am trying to do, is remove the first two columns of a table
The issue is that the first column, contains cells that have a
Since row spans are involved, you'll have to change your strategy. Your table has four columns, so instead of removing the first two columns, you should aim to keep only the last two.
You can achieve that easily by passing a negative upper bound to slice():
$(this).children("td, th").slice(0, -2).remove();
You will find an updated fiddle here.