jQuery: exclude class on click
- by Kevin Brown
//Table select
$("#reports-table tr").click(
function() {
var detail_id = $(this).attr('id');
$(this).addClass("selected");
$(this).siblings().removeClass("selected");
$('#reports-right').show().load('/members/details/'+detail_id);
$('#reports-table').width(680);
}
);
I currently am using this code to add a selected class to a table row and show details of the row clicked in a right 'aside'. The problem is, I have action buttons in the row--when they are clicked, becausee they are children of the tr, this function still runs...
How can I exclude a certain class?