45 lines
1.6 KiB
JavaScript
45 lines
1.6 KiB
JavaScript
(function($) {
|
|
|
|
"use strict";
|
|
var feature_carousels_script_js = function($scope, $) {
|
|
|
|
/*--------------------------------------------------------------
|
|
Owl Slider
|
|
--------------------------------------------------------------*/
|
|
function thmOwlInit() {
|
|
if ($(".thm-owl__carousel").length) {
|
|
$(".thm-owl__carousel").each(function () {
|
|
let elm = $(this);
|
|
let options = elm.data('owl-options');
|
|
let thmOwlCarousel = elm.owlCarousel(options);
|
|
});
|
|
}
|
|
|
|
if ($(".thm-owl__carousel--custom-nav").length) {
|
|
$(".thm-owl__carousel--custom-nav").each(function () {
|
|
let elm = $(this);
|
|
let owlNavPrev = elm.data('owl-nav-prev');
|
|
let owlNavNext = elm.data('owl-nav-next');
|
|
$(owlNavPrev).on("click", function (e) {
|
|
elm.trigger('prev.owl.carousel');
|
|
e.preventDefault();
|
|
});
|
|
|
|
$(owlNavNext).on("click", function (e) {
|
|
elm.trigger('next.owl.carousel');
|
|
e.preventDefault();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
thmOwlInit();
|
|
};
|
|
$(window).on('elementor/frontend/init', function () {
|
|
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_feature_carousel.default', feature_carousels_script_js);
|
|
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_testimonial_carousel.default', feature_carousels_script_js);
|
|
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_clients_Carousel.default', feature_carousels_script_js);
|
|
elementorFrontend.hooks.addAction('frontend/element_ready/thinkai_blog_carousel.default', feature_carousels_script_js);
|
|
});
|
|
|
|
})(window.jQuery); |