Replies: 3 comments
-
<script type="module">
import 'https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js';
var exampleApi = GLightbox({ selector: null });
exampleApi.insertSlide( {
'href': 'https://picsum.photos/1200/800',
'type': 'image',
'title': 'My Title',
'description': 'Example',
});
exampleApi.open();
</script> throws an error: stimulus.index-b5b1d00e42695b8959b4a1e94e3bc92a.js:7 application #start glightbox.min.js:1 Uncaught TypeError: v.getAttribute is not a function |
Beta Was this translation helpful? Give feedback.
-
I converted this to a bug report, it's not simply documenting how to do it, but following the instructions in the documentation throws an error. Thus, more demos! #513 |
Beta Was this translation helpful? Give feedback.
-
I have the same problem and error. I've figured out that it - in my case - only happens in desktop-resolution when I set descPosition to "top" or "bottom". In mobile all four positions are working and the error doesn't prompt in the terminal - but in desktop only "right" and "left" is usable. I will work with "right" and change the position within css as a quick workaround... |
Beta Was this translation helpful? Give feedback.
-
How do I add a description (and title, etc.) via the API? The examples all appear to be data- attributes
Beta Was this translation helpful? Give feedback.
All reactions