How to target a tag with his title value?

How to target a tag with his title value?

Hi everybody,

Im trying to target an element to highlight it when I roll hover on a a tag list (which is a result of ajax request)

I've try that:

  1. // Highlight thumbnail on roll hover post list item
  2. $("#sidebar-left .left-col2 a").live("hover", function(){
  3. var title2 = $(this).attr("title");
  4. alert("title : " + title2);
  5. if ($("#portfolio-list li a").attr('title') == "Mail" ) { $("#portfolio-list li a").attr("title","Digital Mail").css({"border": "1px solid red"}); }
  6. });

My problem with my script is that all "portfolio-list li a" get the red border.

What I want is the "portfolio-list li a" with the title 'Mail'


Do you have any idea?


Regards