1(function ($) { 2 "use strict"; 3 4 var WidgetDefaultHandler = function ($scope) { 5 6 if ($scope.find(".wow").length) { 7 var wow = new WOW({ 8 boxClass: "wow", // animated element css class (default is wow) 9 animateClass: "animated", // animation css class (default is animated) 10 mobile: true, // trigger animations on mobile devices (default is true) 11 live: true, // act on asynchronously loaded content (default is true) 12 }); 13 wow.init(); 14 } 15 16 if ($scope.find(".odometer").length) { 17 var odo = $(".odometer"); 18 odo.each(function () { 19 $(this).appear(function () { 20 var countNumber = $(this).attr("data-count"); 21 $(this).html(countNumber); 22 }); 23 }); 24 } 25 26 // Popular Causes Progress Bar 27 if ($scope.find(".count-bar").length) { 28 $(".count-bar").appear( 29 function () { 30 var el = $(this); 31 var percent = el.data("percent"); 32 $(el).css("width", percent).addClass("counted"); 33 }, { 34 accY: -50, 35 } 36 ); 37 } 38 39 // Popular Causes Progress Bar 40 if ($scope.find(".circle-progress").length) { 41 $(".circle-progress").appear(function () { 42 let circleProgress = $(".circle-progress"); 43 circleProgress.each(function () { 44 let progress = $(this); 45 let progressOptions = progress.data("options"); 46 progress.circleProgress(progressOptions); 47 }); 48 }); 49 } 50 51 //Fact Counter + Text Count 52 if ($scope.find(".count-box").length) { 53 $(".count-box").appear( 54 function () { 55 var $t = $(this), 56 n = $t.find(".count-text").attr("data-stop"), 57 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 58 59 if (!$t.hasClass("counted")) { 60 $t.addClass("counted"); 61 $({ 62 countNum: $t.find(".count-text").text(), 63 }).animate({ 64 countNum: n, 65 }, { 66 duration: r, 67 easing: "linear", 68 step: function () { 69 $t.find(".count-text").text(Math.floor(this.countNum)); 70 }, 71 complete: function () { 72 $t.find(".count-text").text(this.countNum); 73 }, 74 }); 75 } 76 }, { 77 accY: 0, 78 } 79 ); 80 } 81 82 let thmSwiperSliders = $scope.find(".thm-swiper__slider"); 83 if (thmSwiperSliders.length) { 84 thmSwiperSliders.each(function () { 85 let elm = $(this); 86 let options = elm.data("swiper-options"); 87 let thmSwiperSlider = new Swiper( 88 elm, 89 "object" === typeof options ? options : JSON.parse(options) 90 ); 91 }); 92 } 93 94 let thmOwlCarousels = $scope.find(".thm-owl__carousel"); 95 if (thmOwlCarousels.length) { 96 thmOwlCarousels.each(function () { 97 let elm = $(this); 98 let options = elm.data("owl-options"); 99 let thmOwlCarousel = elm.owlCarousel( 100 "object" === typeof options ? options : JSON.parse(options) 101 ); 102 }); 103 } 104 105 let thmOwlNavCarousels = $scope.find(".thm-owl__carousel--custom-nav"); 106 if (thmOwlNavCarousels.length) { 107 thmOwlNavCarousels.each(function () { 108 let elm = $(this); 109 let owlNavPrev = elm.data("owl-nav-prev"); 110 let owlNavNext = elm.data("owl-nav-next"); 111 $(owlNavPrev).on("click", function (e) { 112 elm.trigger("prev.owl.carousel"); 113 e.preventDefault(); 114 }); 115 116 $(owlNavNext).on("click", function (e) { 117 elm.trigger("next.owl.carousel"); 118 e.preventDefault(); 119 }); 120 }); 121 } 122 123 if ($scope.find("#testimonials-two__thumb").length) { 124 let testimonialsThumb = new Swiper("#testimonials-two__thumb", { 125 slidesPerView: 3, 126 spaceBetween: 0, 127 speed: 1400, 128 watchSlidesVisibility: true, 129 watchSlidesProgress: true, 130 loop: true, 131 autoplay: { 132 delay: 5000, 133 }, 134 }); 135
136 let testimonialsCarousel = new Swiper("#testimonials-two__carousel", { 137 observer: true, 138 observeParents: true, 139 speed: 1400, 140 mousewheel: false, 141 slidesPerView: 1, 142 autoplay: { 143 delay: 5000, 144 }, 145 thumbs: { 146 swiper: testimonialsThumb, 147 }, 148 pagination: { 149 el: "#testimonials-one__carousel-pagination", 150 type: "bullets", 151 clickable: true, 152 }, 153 }); 154 } 155 if ($scope.find(".post-filter").length) { 156 var postFilterList = $(".post-filter li"); 157 // for first init 158 $(".filter-layout").isotope({ 159 filter: ".filter-item", 160 animationOptions: { 161 duration: 500, 162 easing: "linear", 163 queue: false, 164 }, 165 }); 166 // on click filter links 167 postFilterList.on("click", function () { 168 var Self = $(this); 169 var selector = Self.attr("data-filter"); 170 postFilterList.removeClass("active"); 171 Self.addClass("active"); 172 173 $(".filter-layout").isotope({ 174 filter: selector, 175 animationOptions: { 176 duration: 500, 177 easing: "linear", 178 queue: false, 179 }, 180 }); 181 return false; 182 }); 183 } 184 }; 185 186 var WidgetFaqHandler = function ($scope) { 187 if ($scope.find(".accrodion-grp").length) { 188 var accrodionGrp = $(".accrodion-grp"); 189 accrodionGrp.each(function () { 190 var accrodionName = $(this).data("grp-name"); 191 var Self = $(this); 192 var accordion = Self.find(".accrodion"); 193 Self.addClass(accrodionName); 194 Self.find(".accrodion .accrodion-content").hide(); 195 Self.find(".accrodion.active").find(".accrodion-content").show(); 196 accordion.each(function () { 197 $(this) 198 .find(".accrodion-title") 199 .on("click", function () { 200 if ($(this).parent().hasClass("active") === false) { 201 $(".accrodion-grp." + accrodionName) 202 .find(".accrodion") 203 .removeClass("active"); 204 $(".accrodion-grp." + accrodionName) 205 .find(".accrodion") 206 .find(".accrodion-content") 207 .slideUp(); 208 $(this).parent().addClass("active"); 209 $(this).parent().find(".accrodion-content").slideDown(); 210 } 211 }); 212 }); 213 }); 214 } 215 }; 216 217 var WidgetFooterSubscribeHandler = function ($scope) { 218 // mailchimp form 219 if ($scope.find(".mc-form").length) { 220 $(".mc-form").each(function () { 221 var Self = $(this); 222 var mcURL = Self.data("url"); 223 var mcResp = Self.parent().find(".mc-form__response"); 224 225 Self.ajaxChimp({ 226 url: mcURL, 227 callback: function (resp) { 228 // appending response 229 mcResp.append(function () { 230 return '<p class="mc-message">' + resp.msg + "</p>"; 231 }); 232 // making things based on response 233 if (resp.result === "success") { 234 // Do stuff 235 Self.removeClass("errored").addClass("successed"); 236 mcResp.removeClass("errored").addClass("successed"); 237 Self.find("input").val(""); 238 239 mcResp.find("p").fadeOut(10000); 240 } 241 if (resp.result === "error") { 242 Self.removeClass("successed").addClass("errored"); 243 mcResp.removeClass("successed").addClass("errored"); 244 Self.find("input").val(""); 245 246 mcResp.find("p").fadeOut(10000); 247 } 248 }, 249 }); 250 }); 251 } 252 }; 253 254 //elementor front start 255 $(window).on("elementor/frontend/init", function () { 256 elementorFrontend.hooks.addAction( 257 "frontend/element_ready/widget", 258 WidgetDefaultHandler 259 ); 260 261 elementorFrontend.hooks.addAction( 262 "frontend/element_ready/agrion-faq.default", 263 WidgetFaqHandler 264 ); 265 266 elementorFrontend.hooks.addAction( 267 "frontend/element_ready/footer-subscribe.default", 268 WidgetFooterSubscribeHandler 269 ); 270 }); 271 272})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.