A gallery was created using both lightgallery and cycle2. Cycle is a carousel plugin while lightgallery is a lightbox gallery.
Clicking on an image in the carousel opens it in the lightbox. Everything worked perfectly until a category in the carousel was clicked, causing an error in the console.
After clicking a category in the carousel, the lightbox fails to open when clicking on an image, resulting in an error message.
The plugin generates the following errors:
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f79b9e909f8390969b9b9a858ab5c787989795">[email protected]</a>...:10 Uncaught TypeError: Cannot read property 's' of undefined
at new c (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ce0e5ebe4f8ebede0e1e8f5eafcbb9a85b899a5">[email protected]</a>...:10)
at Function.<anonymous> (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ef838888879b888e838a839aa3f4809f82">[email protected]</a>...:10)
at Function.each (jquery.min.js:2)
at b.build (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="472b2e202f3320262b2a332e273d399999862b">[email protected]</a>...:5)
at HTMLDivElement.<anonymous> (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1e727779766a797f727e777e77beafb0ad">[email protected]</a>...:5)
at HTMLDivElement.dispatch (jquery.min.js:3)
at HTMLDivElement.q.handle (jquery.min.js:3)
https://i.sstatic.net/Ap4KA.jpg
The issue has been ongoing for two weeks, attempting to find a solution for it.
Alternatively, here is the code snippet:
(JavaScript code here)
(CSS code here)
(HTML & script code here)