tags:

views:

295

answers:

1

I have an asp.net page where the codebehind will generate some anchor tags on the page dynamically .I want to use jQuery tool tip pluggins for those.I want to attach tooltip to those all links.(in my document.ready javascript) .Can anyone tell me how to do it.I have another anchor tags in the page on which i dont want to attach tool tip. Thanks in advance

+3  A: 

Assign a class to all anchor tags you want to have anchor text, then use a jQuery selector to select only those links and add a tool tip by setting the title attribute of the tag.

First in HTML

<a class="tooltip">This link will have a tooltip</a>

Then in jQuery

$('a.tooltip').attr('title','This is the tooltip that will show');
tschaible
Yes That worked. Thanks
Shyju