title: Mouseenter and mouseleave events in Safari browser
body: <p>I am trying to use jQuery to wire up some simple mouse events in a menu page. It works beautifully in Chrome and IE9 but in Safari the highlighting gets stuck on some elements as I move the mouse around. Here are the 3 browsers with the page displayed. You will have to imagine this since I was not permitted to post the link to the screen shot. Sorry.</p>
  
  <p>Here is the code that wires up the events:</p>
  
  <pre><code>$(document).ready(function() {
  
      $("#number").focus();
  
      // We use td elements instead of anchors as the menu items. The ones we want to work with all have 
      // a custom attribute called url that stores the url template...
      var linkCells = $("td[url]");
  
      // Wire up the click handler for each link cell...
      linkCells.click(function () {
          Navigate($(this).attr('url'));
      });
  
      // Wire up mouse events for the link cells. We want to highlight the current cell and update
      // the number label...
      linkCells.bind('mouseenter mouseleave', function(e) {
          var linkCell = $(this);
          linkCell.toggleClass('linkOn');
          if(e.type == 'mouseenter') {
              $("#numberLabel").html('&lt;b&gt;' + linkCell.attr('numberLabel') + '&lt;/b&gt;');
          }
      });
  
      // Wire up the submit event in case the user presses the Enter key instead of clicking a link...
      $("#Form1").submit(function() {
          Navigate($("#lastLink").val());
          return false;
      });
  });
  </code></pre>
  
  <p>Are there any special tricks that will make Safari behave the same as the other browsers?</p>
  
  <p>Thanks,</p>
  
  <p>Matthew MacFarland</p>