derek,
i haven't thoroughly examined how bodyHandler works but i think
something like this should work, provided that your html structure won't
change:
$('div[id^=tt]').tooltip({
bodyHandler: function(){
return $(this).next().html();
}
});
if your html structure will change, you
dennis,
Thanks for the help, both of your examples work great.
I also tried substituting in a class 'tt' in place of the individual
ids and that seems to work good as well.
Is there any speed advantage to this method? I'll probably end up
using this method instead as it seems more elegant.
derek,
i'm not sure if there are any speed advantages (in both cases jquery has
to loop through all divs on the page to find the ones you need - either
by class or by id, so there probably is none) but by using classes your
keeping your html cleaner..
as a rule, things that repeat on a
3 matches
Mail list logo