title: How do I select table row using Jquery?
body: <p>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</p>
  
  <p><a href="http://jsfiddle.net/tonymaloney1971/3tevxmps/1/" rel="noreferrer">http://jsfiddle.net/tonymaloney1971/3tevxmps/1/</a></p>
  
  <p>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.</p>
  
  <p>I have tried the following but it doesn't work:</p>
  
  <pre><code>    $("td").click(function () {
          $('.selected').removeClass('selected');
          $(this).addClass("selected");
  
      });
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>