/home/edulekha/sriramaaresorts.com/wp-content/themes/getleads/assets/js/widget-scripts-pro.js
(function ($, elementor) {
"use strict";
var GetLeads = {
init: function () {
var widgets = {
'elementskit-gallery.default': GetLeads.Gallery,
'elementskit-timeline.default': GetLeads.TimeLine,
};
$.each(widgets, function (widget, callback) {
elementor.hooks.addAction('frontend/element_ready/' + widget, callback);
});
},
Gallery: function ($scope) {
var $galleryGrid = $scope.find('.ekit_gallery_grid'),
masonryConfig = $galleryGrid.data('grid-config');
$galleryGrid.imagesLoaded(function () {
$galleryGrid.isotope(masonryConfig);
});
// Filter List
var $filterList = $scope.find('.filter-button-wraper'),
$filterLinks = $filterList.find('a');
$filterLinks.on('click', function (e) {
e.preventDefault();
var $this = $(this);
$this.parents('.option-set').find('.selected').removeClass('selected');
$this.addClass('selected');
$galleryGrid.isotope({
filter: $this.data('option-value')
});
});
// Tilt Effect
var $tiltTargets = $scope.find('.ekit-gallery-portfolio-tilt'),
tiltConfig = $galleryGrid.data('tilt-config');
$tiltTargets.tilt(tiltConfig);
},
TimeLine: function ($scope) {
var $el = $scope.find('.elementskit-invisible');
$el.elementorWaypoint(function () {
if (this.adapter.$element.hasClass('animated')) {
this.destroy();
return;
}
var animationClass = 'animated ' + this.adapter.$element.data('settings')._animation;
this.adapter.$element.removeClass('elementskit-invisible').addClass(animationClass);
}, { offset: 'bottom-in-view' });
$scope.on('mouseenter', '.horizantal-timeline > .single-timeline', function () {
$(this).addClass('hover').siblings().removeClass('hover');
}).on('mouseleave', '.horizantal-timeline > .single-timeline', function () {
$(this).removeClass('hover');
});
}
};
$(window).on('elementor/frontend/init', GetLeads.init);
}(jQuery, window.elementorFrontend));