Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery title attribute text pop-up hide

I'm currently using the title attribute of my 'a' tag to show and hide images that correspond with this tag.

However, when you hover on the 'a' there is the annoying title text that pops up.

Can I disable this pop-up text with out completely disabling the title attribute? ANy help is great!

Cheers,

DanC

-----edit------

here is the working code which passes as xhtml strict!!!!

$(document).ready(function(){

$(\"ul.projects li a\").hover(
    function(){

    var largeAlt = $(this).attr(\"class\");

    $(\"ul.image_display li#image_hover img\").attr({ src: largeAlt }); 
    $(\"ul.image_display li#image_hover img\").fadeIn();

},
    function(){

    $(\"ul.image_display li#image_hover img\").attr({ src: \"\" }); 
    $(\"ul.image_display li#image_hover img\").fadeIn();

});

});

like image 756
DanC Avatar asked Jan 01 '26 06:01

DanC


2 Answers

You can try using your own custom attributes instead of using the "title" attribute.

<a customtagattribute="some value" id="link1" href="#">Linkety!</a>

EDIT: JSON key value pairs can also be used like this -

var links = { "link1": "attribute value 1", "link2": "attribute value 2", ... };
like image 113
Kirtan Avatar answered Jan 04 '26 08:01

Kirtan


Not really, it's the way the browsers are supposed to behave. If you want to map this data, you might want to establish a Javascript data structure that defines the mappings separately. I'm not sure if there is a good semantic way to establish the relationship.

like image 23
cgp Avatar answered Jan 04 '26 08:01

cgp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!