Remove whole table when inside a class is matched?
At first the code:
- <table>
- <tbody>
- <tr>
- <td >
- <div class="foobar">....</div>
- ...</td>
- </tr>
- </tbody>
- </table>
When a table contains a certain class the whole table should be removed.
The following does NOT work:
$("table .foobar").remove();
How else?