Gallery - Lightbox change transition to a fade not slide
https://www.millbanknurseryschools.co.uk/
https://woodfloors-farnham.co.uk/
To the best of my knowledge, the Lightbox will generally get the default "Slide" animation when navigating through the items, and there is no setting to change that.
But by way of a customization you could try the following:
- Edit the "Gallery" Builder element this is about, click on the tab "Advanced", and enter the following string into the field labeled "CLASSES":
my-lightbox-fade-animation
- Save the changes.
- Navigate to Settings > Custom Code, and into the field "SCRIPT" insert the following:
jQuery(function($) {
$('.my-lightbox-fade-animation [uk-lightbox]').attr('uk-lightbox','toggle: a[data-type]; animation: fade');
});
-
Important in case the field is not empty and already contains any JavaScript content: If the existing script content is wrapped in <script> and </script> tags insert the additional script also wrapped in <script> and </script> tags. Alex provided a helpful information page for this subject: Secrets of the custom code Script field.
- Save the changes.
Reload the page to test the result.
- Hits: 18