title: Why does this jQuery code work in Firefox but not Chrome or Safari?
body: <p>I'm using jQuery to highlight (by changing bg color) some table cells. I want the button (a simple anchor) to be given the class name 'selected' when clicked and I want certain table cells below the buttons to highlight. When you click the same button again, it deselects and removes the highlights from the table cells. When you click a different button, it removes the other highlights and switches to the new appropriate ones.</p>
  
  <p>This all works perfectly in Firefox. When I try it in a webkit browser, it does not. I can't figure out why and it's driving me crazy! The jQuery code is below. You can see the page at: </p>
  
  <p><a href="http://byegurl.com/scores.html" rel="nofollow">http://byegurl.com/scores.html</a></p>
  
  <pre><code>$(function(){
  $(".press").click(function() {
      id = $(this).attr("id");
      name = $("." + id);
      if ($(this).hasClass('selected')) 
           {
              $(this).removeClass('selected');
              $(name).removeClass('highlight');
           } else {
              $('.press').removeClass('selected');
              $("td:not(name)").removeClass('highlight');         
              $(this).addClass('selected');
              $(name).addClass('highlight');
           }
      return false; 
  });
  });         
  </code></pre>
  
  <p>I appreciate your help!</p>