Closed royallife88 closed 2 years ago
I'm from phone now cannot try it, but you can try ItemInstance.data.title
in the callback. Please note that this can differ based on how the tooltip was initiated.
It did not worked. get error
Cannot read properties of undefined (reading 'title')
$.protip({
defaults: {
placement: "border",
animate: false,
delayIn: 0,
delayOut: 0,
interactive: false,
mixin: "css-no-transition"
}
});
Initialized like this.
I think the docs need to be updated. The first parameter in the callback is the jQuery event object, the second is the item instance.
$('.protip').on('protipshow', function(ev, ItemInstance){
console.log(ItemInstance.data.title);
});
Closing the thread, let me know if you still have problems and I reopen it.
Thank you! it's working.
Hi, How to retrieve title and other data attributes from protip instance on protipshow event.