Delete table row on user click Demo

This is a demo for Delete table row on user click blog post.

Click on any row to delete it

This is a table with id="table1" Column 2
row 2, cell 1 Column 2
row 3, cell 1 Column 2
row 4, cell 1 Column 2
row 5, cell 1 Column 2

Code:

$(document).ready(function(){
	$('#table1 td').click(function(){
		$(this).parent().remove();
	});
});

Click on delete image to delete it

row 1, cell 1
row 2, cell 1
row 3, cell 1
row 5, cell 1
row 5, cell 1

Code:

$(document).ready(function(){
	$('#table2 td img.delete').click(function(){
		$(this).parent().parent().remove();
	});
});

« Other demos