How to get data attributes off the image in the full screen from a custom button click in the toolbar? #485
Closed
geolectric
started this conversation in
General
Replies: 2 comments 3 replies
-
Hi, It would be like this (demo - https://jsfiddle.net/807d3sq2/): click: (toolbar) => {
console.log(toolbar.instance.getSlide().test);
} If you need to get trigger element: toolbar.instance.getSlide().triggerEl |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! I need to get data in 'tpl' not in 'click' - can you help with some example? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I add a custom button to the toolbar, then on the button click, how can I get data attributes off the current image?
So, similar to the example code on the website:
How could I get the
data-test
value from the custom button click? Off either the<a>
or<img>
elements for the currently displayed full screen image?Beta Was this translation helpful? Give feedback.
All reactions