views:

428

answers:

2

I'm using cluetip for tooltips in my web site, and I want to set the tooltip text based on the link url.

For example: I have a link on my page to "http:abc.com/display?content=sweeties" and I want the tooltip to read "sweeties"

Someone show me how, please?

+1  A: 

You should set the title of your link to "sweeties" and then instruct whatever tooltiping plugin to use actually the title attribute for content.

I think it could work with cluetip out of the box.

Rashack
I read on cluetip API/option and they point out that using rel attribute in anchor to get the path to the content. I'm not try to change the default option of them. I think you mean the title in cluetip will load the title content in anchor, aren't you?
gacon
A: 
var a = $("aTagsId");
var content = a.attr('href').match(/content\=([^\&]*)/)[1];
a.attr('title', content);
... setup cluetip w/ title...
Tracker1
Now I don't have time to try your code but I think It's work, thank you anyway Tracker1!
gacon