moidul dargahi
moidul dargahi

Reputation: 193

Changing color of an anchor's title

I want to change the title color for anchor tags which are below container class.

jQuery

$(document).ready(function(){
    $('[title]').colorTip({color:'yellow'});
});

HTML

<div class="container">
    <a href="http://tutorialzine.com/" title="title only here.">congue</a> 
</div>

It doesn't appear to change the color. Any advice?

Upvotes: 3

Views: 43

Answers (1)

j08691
j08691

Reputation: 207901

Change:

$('[title]').colorTip({color:'yellow'});

to:

$('div.container > a[title]').colorTip({color:'yellow'});

The div.container > a[title] means only select an anchor with a title attribute that is a child of a div with the container class.

Upvotes: 3

Related Questions