Reputation: 193
I want to change the title color for anchor tags which are below container
class.
$(document).ready(function(){
$('[title]').colorTip({color:'yellow'});
});
<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
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