Adding 'title' in the API throws an error #519
-
This is pretty much from the documentation, but throws an error. <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.
Replies: 3 comments 4 replies
-
Hmm, I thought discussions were for "how to", isn't this a bug? Or an error in the documentation? Or am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
-
Oh, or is this because v4 is close to release? Can you give an update on that? If it's available on a CDN perhaps we can start testing, checking the docs, etc. |
Beta Was this translation helpful? Give feedback.
-
I'm going to investigate this more, perhaps there's a conflict on my website. |
Beta Was this translation helpful? Give feedback.
Here is a codepen with just that. You can see that the snippet works fine and there is no error.