I need to replace this jQuery function with pure javascript.
$('#myTable span.hide').click(function () {
$(this).closest("tr").remove();
return false;
});
I tried to replace it with this but it doesn't work in IE.
function rem(id) {
id.parentNode.parentNode.innerHTML = "<td></td>";
}
Here's how the table looks:
<tbody id="thebody">
<tr>
<td>
<span onclick="rem(this);" class="hide"></span>
</td>
//More td's here
</tr>
</tbody>