ec-confettieffect.js
6 months ago
ec-confettieffect.min.js
6 months ago
ecafe-accordion.js
6 months ago
ecafe-accordion.min.js
6 months ago
ecafe-assets.js
6 months ago
ecafe-assets.min.js
6 months ago
ecafe-back-to-top.js
6 months ago
ecafe-back-to-top.min.js
6 months ago
ecafe-changelog.js
6 months ago
ecafe-changelog.min.js
6 months ago
ecafe-chart.js
6 months ago
ecafe-chart.min.js
6 months ago
ecafe-countdown.js
6 months ago
ecafe-countdown.min.js
6 months ago
ecafe-coupon-code.js
6 months ago
ecafe-coupon-code.min.js
6 months ago
ecafe-hover-background.js
6 months ago
ecafe-hover-background.min.js
6 months ago
ecafe-image-accordion.js
6 months ago
ecafe-image-accordion.min.js
6 months ago
ecafe-image-scroll.js
6 months ago
ecafe-image-scroll.min.js
6 months ago
ecafe-infocircle.js
6 months ago
ecafe-infocircle.min.js
6 months ago
ecafe-infounfold.js
6 months ago
ecafe-infounfold.min.js
6 months ago
ecafe-lottie.js
6 months ago
ecafe-lottie.min.js
6 months ago
ecafe-marketing-link.js
6 months ago
ecafe-marketing-link.min.js
6 months ago
ecafe-page-piling.js
6 months ago
ecafe-page-piling.min.js
6 months ago
ecafe-page-scroll-to-id.js
6 months ago
ecafe-page-scroll-to-id.min.js
6 months ago
ecafe-pdf-viewer.js
6 months ago
ecafe-pdf-viewer.min.js
6 months ago
ecafe-post-image.js
6 months ago
ecafe-post-image.min.js
6 months ago
ecafe-post-listing.js
6 months ago
ecafe-post-listing.min.js
6 months ago
ecafe-qrcode.js
6 months ago
ecafe-qrcode.min.js
6 months ago
ecafe-scroll-progress.js
6 months ago
ecafe-scroll-progress.min.js
6 months ago
ecafe-sticky-video.js
6 months ago
ecafe-sticky-video.min.js
6 months ago
ecafe-tabs.js
6 months ago
ecafe-tabs.min.js
6 months ago
ecafe-tilt-custom.js
6 months ago
ecafe-tilt-custom.min.js
6 months ago
ecafe-tippy-custom.js
6 months ago
ecafe-tippy-custom.min.js
6 months ago
ecafe-toc.js
6 months ago
ecafe-toc.min.js
6 months ago
ecafe-whatsapp.js
6 months ago
ecafe-whatsapp.min.js
6 months ago
ecafe.js
6 months ago
ecafe.min.js
6 months ago
ecafe-page-piling.js
88 lines
| 1 | (function ($) { |
| 2 | "use strict"; |
| 3 | var WidgetPagePiling = function ($scope, $) { |
| 4 | $(document).ready(function() { |
| 5 | if( $scope.find('.eca-page-piling-wrapper').length ){ |
| 6 | $("#pp-nav").remove(); |
| 7 | var ppoptions = $scope.find('.eca-page-piling-wrapper').data("ppoptions"); |
| 8 | if($(window).innerWidth() >= ppoptions['disable']){ |
| 9 | $scope.find('.eca-page-piling-wrapper').closest('body,html').addClass('ecppused'); |
| 10 | var anchorsreturn = ppoptions['anchors'].split(',').map(function(item) { |
| 11 | return item.trim(); |
| 12 | }); |
| 13 | var navigationtooltipsreturn = ppoptions['navigationtooltips'].split(',').map(function(item) { |
| 14 | return item.trim(); |
| 15 | }); |
| 16 | $('#pagepiling').pagepiling({ |
| 17 | direction: ppoptions['direction'], |
| 18 | verticalCentered: ppoptions['verticalCentered'], |
| 19 | sectionsColor: [], |
| 20 | anchors: anchorsreturn, |
| 21 | menu: '#ec-pp-menu', |
| 22 | scrollingSpeed: ppoptions['scrollingSpeed'], |
| 23 | easing: ppoptions['easing'], |
| 24 | loopBottom: ppoptions['loopBottom'], |
| 25 | loopTop: ppoptions['loopTop'], |
| 26 | css3: true, |
| 27 | navigation: { |
| 28 | 'position': ppoptions['navigationposition'], |
| 29 | 'tooltips': navigationtooltipsreturn |
| 30 | }, |
| 31 | normalScrollElements: null, |
| 32 | normalScrollElementTouchThreshold: 5, |
| 33 | touchSensitivity: 5, |
| 34 | keyboardScrolling: ppoptions['keyboardScrolling'], |
| 35 | sectionSelector: '.section', |
| 36 | animateAnchor: false, |
| 37 | |
| 38 | onLeave: function(index, nextIndex, direction){ |
| 39 | var ecppanimation = $scope.find('.pp-section:not(.active)'); |
| 40 | if($scope.find(".pp-section .elementor-widget[data-settings]").length > 0){ |
| 41 | $(ecppanimation).find(".elementor-widget[data-settings].animated").each(function() { |
| 42 | if($(this).data("settings")._animation){ |
| 43 | $(this).addClass("elementor-invisible").removeClass($(this).data("settings")._animation +" animated"); |
| 44 | } |
| 45 | }); |
| 46 | } |
| 47 | }, |
| 48 | afterLoad: function(anchorLink, index){ |
| 49 | if($scope.find(".pp-section .elementor-widget[data-settings]").length > 0){ |
| 50 | var ecppanimationactive = $scope.find('.pp-section.active'); |
| 51 | $(ecppanimationactive).find(".elementor-widget[data-settings]:not(.animated)").each(function() { |
| 52 | var element = $(this); |
| 53 | if(element.data("settings")._animation && element.data("settings")._animation_delay){ |
| 54 | setTimeout(function(){ |
| 55 | element.removeClass("elementor-invisible").addClass(element.data("settings")._animation + ' animated'); |
| 56 | }, element.data("settings")._animation_delay); |
| 57 | }else{ |
| 58 | element.removeClass("elementor-invisible").addClass(element.data("settings")._animation + ' animated'); |
| 59 | } |
| 60 | }); |
| 61 | } |
| 62 | }, |
| 63 | }); |
| 64 | |
| 65 | // Trigger animation on first load |
| 66 | setTimeout(function(){ |
| 67 | var firstSection = $scope.find('.pp-section.active'); |
| 68 | firstSection.find(".elementor-widget[data-settings]").each(function() { |
| 69 | var element = $(this); |
| 70 | if(element.data("settings")._animation && element.data("settings")._animation_delay){ |
| 71 | setTimeout(function(){ |
| 72 | element.removeClass("elementor-invisible").addClass(element.data("settings")._animation + ' animated'); |
| 73 | }, element.data("settings")._animation_delay); |
| 74 | } else { |
| 75 | element.removeClass("elementor-invisible").addClass(element.data("settings")._animation + ' animated'); |
| 76 | } |
| 77 | }); |
| 78 | }, 500); // Delay to ensure pagepiling has initialized |
| 79 | }else{ |
| 80 | $scope.find('.eca-page-piling-wrapper').closest('body,html').addClass('ecppunused'); |
| 81 | } |
| 82 | } |
| 83 | }); |
| 84 | }; |
| 85 | $(window).on('elementor/frontend/init', function () { |
| 86 | elementorFrontend.hooks.addAction('frontend/element_ready/ecafe-page-piling.default', WidgetPagePiling); |
| 87 | }); |
| 88 | })(jQuery); |