Issue with .attr("title")

Issue with .attr("title")

Hello,

I have got a little script that shows div's and hides classes when I click on a list item.
Here is the HTML -
  1. <div id="menu">
  2.       <ul>
  3.             <li title="test1">Test 1</li>
  4.             <li title="test2">Test 2</li>
  5.       </ul>
  6. </div>

  7. <div id="test1" class="tab" style="display:none;">First Test DIV</div>
  8. <div id="test2" class="tab" style="display:none;">Second Test DIV</div>
And here the jQuery code -
  1. $("#menu li").live('click', function() {
  2.       var name = $(this).attr("title");
  3.       $(".tab").hide();
  4.       $("#"+name).show();
  5. });
I use .live() so that I can append other list (menu) items later on.

This works, it hides the shown DIV and shows the DIV where the DIV's id equals the list item it's title.

However, whenever I mouseover a list item it shows the title's value, as is usually the case when hovering over a list item with the title attribute being set.

I wonder if there is a way to remove this, or whether there is another way to do this - Showing a certain DIV when a (in one way or another) linked list item is clicked, while not showing any tooltip on hover, because that's just plain ugly.


Thanks in advance and kind regards,

Wouter H