I have a tabulated list of records - an HTML table.

Most rows have 3 columns but some may have just 1 or 2. In this case, I use colspan and stretch it across the other columns.

What I want to do:
When a user clicks a button on the page, I want to remove the last column (collapse), ONLY if it has more than one column.

How is this possible with jquery (if it can be done)?