gallery.js (1973B)
1 (function ($) { 2 3 "use strict"; 4 5 var gallery_js = function ($scope, $) { 6 7 if ($('.gallery-carousel').length) { 8 $('.gallery-carousel').owlCarousel({ 9 loop:true, 10 margin:6, 11 nav:true, 12 smartSpeed: 500, 13 autoplay: 5000, 14 navText: [ '<span class="fas fa-angle-left"></span>', '<span class="fas fa-angle-right"></span>' ], 15 responsive:{ 16 0:{ 17 items:1 18 }, 19 600:{ 20 items:2 21 }, 22 800:{ 23 items:3 24 }, 25 1024:{ 26 items:3 27 }, 28 1200:{ 29 items:4 30 } 31 } 32 }); 33 } 34 35 if ($('.four-item-carousel').length) { 36 $('.four-item-carousel').owlCarousel({ 37 loop:true, 38 margin:30, 39 nav:true, 40 smartSpeed: 500, 41 autoplay: 1000, 42 navText: [ '<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>' ], 43 responsive:{ 44 0:{ 45 items:1 46 }, 47 600:{ 48 items:2 49 }, 50 800:{ 51 items:3 52 }, 53 1024:{ 54 items:3 55 }, 56 1200:{ 57 items:4 58 } 59 } 60 }); 61 } 62 } 63 64 65 $(window).on('elementor/frontend/init', function () { 66 elementorFrontend.hooks.addAction('frontend/element_ready/resox_gallery.default', gallery_js); 67 }); 68 })(window.jQuery);