I have many table cells which I want to show a tooltip once hovered. Each td element has a rel attribute with a request URI for ajax to fetch content into a tooltip. Right now I do it like this:
$('table td.tooltipped').each(function() {
var uri = $(this).attr("rel");
$(this).bt({
ajaxPath: uri,
ajaxError: "<strong>Error!</strong> Here's what we know: <em>%error</em>."
});
});
It seems a little redundant to me but I can’t figure out how to do it without the each loop. Any ideas?
From the documentation:
So it would seem that you can do this:
I’ll let you test it.