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:
- // Highlight thumbnail on roll hover post list item
- $("#sidebar-left .left-col2 a").live("hover", function(){
- var title2 = $(this).attr("title");
- alert("title : " + title2);
- if ($("#portfolio-list li a").attr('title') == "Mail" ) { $("#portfolio-list li a").attr("title","Digital Mail").css({"border": "1px solid red"}); }
-
- });
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