How can you make the SimpleTip plugin use each element's title
attribute for the tooltip text when you're applying it to a group of elements?
$('td[title]').simpletip({
content : << this element's title attribute >>
});
How can you make the SimpleTip plugin use each element's title
attribute for the tooltip text when you're applying it to a group of elements?
$('td[title]').simpletip({
content : << this element's title attribute >>
});
I found a hack to do it:
In the Simpletip source code, around line 25:
// change this line:
.html(conf.content)
// to this
.html(conf.content ? conf.content : elem.attr('title'))
and then when you call the simpletip function:
$('td[title]').simpletip({
content: false
});
Yep, it's a bit hacky, but it works.
I think this will work for you
$('td[title]').each(function() {
$(this).simpletip({
content : $(this).attr('title')
});
});
$('td[title]').each(function() {
$(this).simpletip({
content : $(this).attr('title')
});
});