I am trying to to select a table row using JQuery, but it seems not to fire the .selected event. I have put the code on JSFiddle
http://jsfiddle.net/tonymaloney1971/3tevxmps/1/
I would like a table row selected when the mouse is clicked and change row colour and display an alert message with the selected row information.
I have tried the following but it doesn't work:
$("td").click(function () {
$('.selected').removeClass('selected');
$(this).addClass("selected");
});
Any ideas?
Thanks