atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
12.03k stars 520 forks source link

Passing data-attribute value to tippy content #855

Closed TheBoringBOT closed 4 years ago

TheBoringBOT commented 4 years ago

I have a button with a data-value i must use for the dyanamic template. How can I pass the data from the clicked button to the tippy template. I use the tippy on multiple buttons and the template is dynamic depending on that data-value <button data-value="id23">

BallisticPain commented 4 years ago

@TheBoringBOT ... not sure if you've figured out a way to do what you're needing, but as I'm searching for information, I thought this might be helpful to solve your issue? https://atomiks.github.io/tippyjs/v6/faq/#plugin ... it's using an attribute of the reference (clicked / hovered element). Hope it helps!

TheBoringBOT commented 4 years ago

@TheBoringBOT ... not sure if you've figured out a way to do what you're needing, but as I'm searching for information, I thought this might be helpful to solve your issue? https://atomiks.github.io/tippyjs/v6/faq/#plugin ... it's using an attribute of the reference (clicked / hovered element). Hope it helps!

I did manage to fix it. But thanks for your input