File: /home/frenchy/refonte2023/wordpress/wp-content/themes/gimont/assets/js/elementor/news-update.js
(function($){
"use strict";
$(window).on('elementor/frontend/init', function () {
elementorFrontend.hooks.addAction('frontend/element_ready/gimont_elementor_news_update.default', function(){
/* Add your code here */
var newsUpdate = $('.ova-news-update');
var newsUpdateDataOption = $('.ova-news-update').attr('data-option');
var owlsl_ops = JSON.parse(newsUpdateDataOption);
var newsUpdateOwl = newsUpdate.find('.owl-carousel');
if ( $('body').hasClass('rtl') ) {
owlsl_ops.rtl = true;
}
newsUpdateOwl.owlCarousel({
loop:owlsl_ops.loop,
margin:10,
nav:true,
dots:false,
items: 1,
autoplay: owlsl_ops.autoplay,
autoplayTimeout: owlsl_ops.autoplayTimeout,
autoplayHoverPause: owlsl_ops.autoplayHoverPause,
slideBy: owlsl_ops.slideBy,
smartSpeed: owlsl_ops.smartSpeed,
rtl: owlsl_ops.rtl,
navText: ['<i class="gimonticon gimonticon-arrow"></i>','<i class="gimonticon gimonticon-right"></i>'],
responsive:{
0:{
nav:false,
},
769:{
nav:true,
},
}
});
/* Fixed WCAG */
newsUpdateOwl.find(".owl-nav button.owl-prev").attr("title", "Previous");
newsUpdateOwl.find(".owl-nav button.owl-next").attr("title", "Next");
newsUpdateOwl.find(".owl-dots button").attr("title", "Dots");
});
});
})(jQuery);