redstrate.com/themes/red/assets/js/gallery.js

23 lines
669 B
JavaScript
Raw Normal View History

imagesLoaded(document.querySelector('.grid'), function(instance) {
new Masonry('.grid', {
itemSelector: '.grid-item',
columnWidth: '.grid-sizer',
2024-01-27 20:41:25 -05:00
gutter: '.gutter-sizer',
transitionDuration: 0,
resize: true
});
});
2023-07-02 22:24:51 -04:00
2024-01-27 10:58:18 -05:00
const element = document.getElementsByClassName('second-grid');
if (element.length > 0) {
imagesLoaded(document.querySelector('.second-grid'), function(instance) {
new Masonry('.second-grid', {
itemSelector: '.grid-item',
columnWidth: '.grid-sizer',
2024-01-27 20:41:25 -05:00
gutter: '.gutter-sizer',
transitionDuration: 0,
resize: true
2024-01-27 10:58:18 -05:00
});
2023-07-02 22:24:51 -04:00
});
2024-01-27 10:58:18 -05:00
}