Hello Team
I am looking to get add a button when clicks opens up a lightbox containing gallery images.
I have managed to get everything to work by following a x theme form here BUT I can’t get it to work on mobile.
My code as as follows:
In Text Element
<div class="lightbox-group">
[button type="flat" shape="rounded" size="x-large" block="true" title="Example" class="gallery-button"][x_icon type="picture-o"]Gallery[/button]
[gallery link="file" ids="4439,4048"]
[lightbox thumbnails="true" selector=".lightbox-group .gallery-item a"]
CSS
* Gallery Button */
.lightbox-group {
background-color: rgb(54,60,69);
}
.lightbox-group .gallery {
display: none;
}
.ilightbox-next {
left: 1500px !important;
}
.ilightbox-prev {
left: -500px !important;
}
.x-btn .gallery-button {
text-shadow: none !important;
}
JS
jQuery ( function($) {
$('.lightbox-group .gallery-button').off('touchstart touchend').on('click', function() {
$('.lightbox-group .gallery-item:first-child a').trigger('click');
} );
} );
Please can you help with understanding why this is not working on mobile.
Regards
Stefan