I’m implementing a Tooltip for cells within table and I need to be able to grab the target’s data-message attribute.
$("#pricing_plans_table .sku_tooltip").tooltip({
// each trashcan image works as a trigger
tip: '#' + $(this).attr('data-message'),
// move tooltip a little bit to the right
offset: [0, 15],
// there is no delay when the mouse is moved away from the trigger
delay: 0
});
That doesn’t work. I get “Cannot find tooltip for [object Object]” … I’m not quite sure how to reference the target correctly.
I don’t think you can use
thisinside a map like that. Try: