1(function ($) { 2 "use strict"; 3 4 var WidgetDefaultHandler = function ($scope) { 5 // mailchimp form 6 if ($scope.find(".mc-form").length) { 7 $scope.find(".mc-form").each(function () { 8 var Self = $(this); 9 var mcURL = Self.data("url"); 10 var mcResp = Self.parent().find(".mc-form__response"); 11 12 Self.ajaxChimp({ 13 url: mcURL, 14 callback: function (resp) { 15 // appending response 16 mcResp.append(function () { 17 return '<p class="mc-message">' + resp.msg + "</p>"; 18 }); 19 // making things based on response 20 if (resp.result === "success") { 21 // Do stuff 22 Self.removeClass("errored").addClass("successed"); 23 mcResp.removeClass("errored").addClass("successed"); 24 Self.find("input").val(""); 25 26 mcResp.find("p").fadeOut(10000); 27 } 28 if (resp.result === "error") { 29 Self.removeClass("successed").addClass("errored"); 30 mcResp.removeClass("successed").addClass("errored"); 31 Self.find("input").val(""); 32 33 mcResp.find("p").fadeOut(10000); 34 } 35 } 36 }); 37 }); 38 } 39 40 // Sidebar 41 if ( 42 $scope.find( 43 ".main-header--five__toggler, .sidebar-one__overlay, .sidebar-one__close" 44 ).length 45 ) { 46 $scope 47 .find( 48 ".main-header--five__toggler, .sidebar-one__overlay, .sidebar-one__close" 49 ) 50 .on("click", function (e) { 51 e.preventDefault(); 52 $scope.find(".sidebar-one").toggleClass("active"); 53 $("body").toggleClass("locked"); 54 }); 55 } 56 57 if ($scope.find(".wow").length) { 58 var wow = new WOW({ 59 boxClass: "wow", // animated element css class (default is wow) 60 animateClass: "animated", // animation css class (default is animated) 61 mobile: true, // trigger animations on mobile devices (default is true) 62 live: true // act on asynchronously loaded content (default is true) 63 }); 64 wow.init(); 65 } 66 //Fact Counter + Text Count 67 if ($scope.find(".count-box").length) { 68 $scope.find(".count-box").appear( 69 function () { 70 var $t = $(this), 71 n = $t.find(".count-text").attr("data-stop"), 72 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 73 74 if (!$t.hasClass("counted")) { 75 $t.addClass("counted"); 76 $({ 77 countNum: $t.find(".count-text").text() 78 }).animate({ 79 countNum: n 80 }, { 81 duration: r, 82 easing: "linear", 83 step: function () { 84 $t.find(".count-text").text(Math.floor(this.countNum)); 85 }, 86 complete: function () { 87 $t.find(".count-text").text(this.countNum); 88 } 89 }); 90 } 91 }, { 92 accY: 0 93 } 94 ); 95 } 96 97 // owl slider 98 let laboixowlCarousel = $scope.find(".laboix-owl__carousel"); 99 if (laboixowlCarousel.length) { 100 laboixowlCarousel.each(function () { 101 let elm = $(this); 102 let options = elm.data("owl-options"); 103 let thmOwlCarousel = elm.owlCarousel( 104 "object" === typeof options ? options : JSON.parse(options) 105 ); 106 elm.find("button").each(function () { 107 $(this).attr("aria-label", "carousel button"); 108 }); 109 }); 110 } 111 112 let laboixowlCarouselNav = $scope.find(".laboix-owl__carousel--custom-nav"); 113 if (laboixowlCarouselNav.length) { 114 laboixowlCarouselNav.each(function () { 115 let elm = $(this); 116 let owlNavPrev = elm.data("owl-nav-prev"); 117 let owlNavNext = elm.data("owl-nav-next"); 118 $(owlNavPrev).on("click", function (e) { 119 elm.trigger("prev.owl.carousel"); 120 e.preventDefault(); 121 }); 122 123 $(owlNavNext).on("click", function (e) { 124 elm.trigger("next.owl.carousel"); 125 e.preventDefault(); 126 }); 127 }); 128 } 129 130 if ($scope.find(".odometer").length) { 131 var odo = $scope.find(".odometer"); 132 odo.each(function () { 133 $(this).appear(function () { 134 var countNumber = $(this).attr("data-count"); 135 $(this).html(countNumber); 136 }); 137 }); 138 } 139 140 if ($scope.find(".masonry-layout").length) { 141 $scope.find(".masonry-layout").imagesLoaded(function () { 142 $scope.find(".masonry-layout").isotope({ 143 layoutMode: "masonry" 144 }); 145 }); 146 } 147
148 if ($scope.find(".img-popup").length) { 149 var groups = {}; 150 $scope.find(".img-popup").each(function () { 151 var id = parseInt($(this).attr("data-group"), 10); 152 153 if (!groups[id]) { 154 groups[id] = []; 155 } 156 157 groups[id].push(this); 158 }); 159 160 $.each(groups, function () { 161 $(this).magnificPopup({ 162 type: "image", 163 closeOnContentClick: true, 164 closeBtnInside: false, 165 gallery: { 166 enabled: true 167 } 168 }); 169 }); 170 } 171 172 if ($scope.find(".laboix-masonary").length) { 173 $scope.find(".laboix-masonary").imagesLoaded(function () { 174 $scope.find(".laboix-masonary").isotope({ 175 layoutMode: "masonry" 176 }); 177 }); 178 } 179 180 if ($scope.find(".post-filter").length) { 181 $scope.find(".post-filter li") 182 .children(".filter-text") 183 .on("click", function () { 184 var Self = $(this); 185 var selector = Self.parent().attr("data-filter"); 186 $scope.find(".post-filter li").removeClass("active"); 187 Self.parent().addClass("active"); 188 $scope.find(".laboix-filter").isotope({ 189 filter: selector, 190 animationOptions: { 191 duration: 500, 192 easing: "linear", 193 queue: false 194 } 195 }); 196 return false; 197 }); 198 } 199 200 if ($scope.find(".post-filter.has-dynamic-filters-counter").length) { 201 // var allItem = $('.single-filter-item').length; 202 var activeFilterItem = $scope.find(".post-filter.has-dynamic-filters-counter").find( 203 "li" 204 ); 205 activeFilterItem.each(function () { 206 var filterElement = $(this).data("filter"); 207 var count = $scope.find(".laboix-filter").find(filterElement).length; 208 $(this) 209 .children(".filter-text") 210 .append('<span class="count">(' + count + ")</span>"); 211 }); 212 } 213 214 if ($scope.find(".masonary-layout").length) { 215 $scope.find(".masonary-layout").isotope({ 216 layoutMode: "masonry" 217 }); 218 } 219 if ($scope.find(".post-filter").length) { 220 $scope 221 .find(".post-filter li") 222 .children(".filter-text") 223 .on("click", function () { 224 var Self = $(this); 225 var selector = Self.parent().attr("data-filter"); 226 $scope.find(".post-filter li").removeClass("active"); 227 Self.parent().addClass("active"); 228 $scope.find(".filter-layout").isotope({ 229 filter: selector, 230 animationOptions: { 231 duration: 500, 232 easing: "linear", 233 queue: false 234 } 235 }); 236 return false; 237 }); 238 } 239 if ($scope.find(".tabs-box").length) { 240 $scope.find(".tab-btn").on("click", function (e) { 241 e.preventDefault(); 242 var target = $($(this).attr("data-tab")); 243 if ($(target).is(":visible")) { 244 return false; 245 } else { 246 target 247 .parents(".tabs-box") 248 // .find(".tab-buttons") 249 .find(".tab-btn") 250 .removeClass("active-btn"); 251 $(this).addClass("active-btn"); 252 target 253 .parents(".tabs-box") 254 // .find(".tabs-content") 255 .find(".tab") 256 .fadeOut(0); 257 target 258 .parents(".tabs-box") 259 // .find(".tabs-content") 260 .find(".tab") 261 .removeClass("active-tab"); 262 $(target).fadeIn(300); 263 $(target).addClass("active-tab"); 264 } 265 }); 266 } 267 268 if ($scope.find(".neighborhoods__faq").length) { 269 $scope 270 .find(".neighborhoods__faq") 271 .find(".accrodion") 272 .each(function () { 273 $(this).on("click", function () { 274 let tabName = $(this).data("name"); 275 $scope.find(".neighborhoods__img-box") 276 .find(".neighborhoods__location-1") 277 .removeClass("active"); 278 $scope.find(".neighborhoods__img-box") 279 .find(".neighborhoods__location-1." + tabName) 280 .addClass("active"); 281 }); 282 }); 283 } 284 285 // Accrodion 286 if ($scope.find(".laboix-accrodion").length) { 287 var accrodionGrp = $scope.find(".laboix-accrodion"); 288 accrodionGrp.each(function () { 289 var accrodionName = $(this).data("grp-name"); 290 var Self = $(this); 291 var accordion = Self.find(".accrodion"); 292 Self.addClass(accrodionName); 293 Self.find(".accrodion .accrodion-content").hide(); 294 Self.find(".accrodion.active").find(".accrodion-content").show(); 295 accordion.each(function () { 296 $(this) 297 .find(".accrodion-title") 298 .on("click", function () { 299 if ($(this).parent().hasClass("active") === false) { 300 $scope.find(".laboix-accrodion." + accrodionName) 301 .find(".accrodion") 302 .removeClass("active"); 303 $scope.find(".laboix-accrodion." + accrodionName) 304 .find(".accrodion") 305 .find(".accrodion-content") 306 .slideUp(); 307 $(this).parent().addClass("active"); 308 $(this).parent().find(".accrodion-content").slideDown(); 309 } 310 }); 311 }); 312 }); 313 } 314 315 // Popular Causes Progress Bar 316 if ($scope.find(".count-bar").length) { 317 $scope.find(".count-bar").appear( 318 function () { 319 var el = $(this); 320 var percent = el.data("percent"); 321 $(el).css("width", percent).addClass("counted"); 322 }, {
323 accY: -50 324 } 325 ); 326 } 327 328 // Popular Causes Progress Bar 329 if ($scope.find(".circle-progress").length) { 330 $scope.find(".circle-progress").appear(function () { 331 let circleProgress = $scope.find(".circle-progress"); 332 circleProgress.each(function () { 333 let progress = $(this); 334 let progressOptions = progress.data("options"); 335 progress.circleProgress(progressOptions); 336 }); 337 }); 338 } 339 340 //Fact Counter + Text Count 341 if ($scope.find(".count-box").length) { 342 $scope.find(".count-box").appear( 343 function () { 344 var $t = $(this), 345 n = $t.find(".count-text").attr("data-stop"), 346 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 347 348 if (!$t.hasClass("counted")) { 349 $t.addClass("counted"); 350 $({ 351 countNum: $t.find(".count-text").text() 352 }).animate({ 353 countNum: n 354 }, { 355 duration: r, 356 easing: "linear", 357 step: function () { 358 $t.find(".count-text").text(Math.floor(this.countNum)); 359 }, 360 complete: function () { 361 $t.find(".count-text").text(this.countNum); 362 } 363 }); 364 } 365 }, { 366 accY: 0 367 } 368 ); 369 } 370 371 let thmSwiperSliders = $scope.find(".thm-swiper__slider"); 372 if (thmSwiperSliders.length) { 373 thmSwiperSliders.each(function () { 374 let elm = $(this); 375 let options = elm.data("swiper-options"); 376 let thmSwiperSlider = new Swiper( 377 elm, 378 "object" === typeof options ? options : JSON.parse(options) 379 ); 380 }); 381 } 382 383 let thmOwlCarousels = $scope.find(".laboix-owl__carousel"); 384 if (thmOwlCarousels.length) { 385 thmOwlCarousels.each(function () { 386 let elm = $(this); 387 let options = elm.data("owl-options"); 388 let thmOwlCarousel = elm.owlCarousel( 389 "object" === typeof options ? options : JSON.parse(options) 390 ); 391 }); 392 } 393 394 let thmOwlNavCarousels = $scope.find(".thm-owl__carousel--custom-nav"); 395 if (thmOwlNavCarousels.length) { 396 thmOwlNavCarousels.each(function () { 397 let elm = $(this); 398 let owlNavPrev = elm.data("owl-nav-prev"); 399 let owlNavNext = elm.data("owl-nav-next"); 400 $(owlNavPrev).on("click", function (e) { 401 elm.trigger("prev.owl.carousel"); 402 e.preventDefault(); 403 }); 404 405 $(owlNavNext).on("click", function (e) { 406 elm.trigger("next.owl.carousel"); 407 e.preventDefault(); 408 }); 409 }); 410 } 411 412 if ($scope.find("#testimonials-two__thumb").length) { 413 let testimonialsThumb = new Swiper("#testimonials-two__thumb", { 414 slidesPerView: 3, 415 spaceBetween: 0, 416 speed: 1400, 417 watchSlidesVisibility: true, 418 watchSlidesProgress: true, 419 loop: true, 420 autoplay: { 421 delay: 5000 422 } 423 }); 424 425 let testimonialsCarousel = new Swiper("#testimonials-two__carousel", { 426 observer: true, 427 observeParents: true, 428 speed: 1400, 429 mousewheel: false, 430 slidesPerView: 1, 431 autoplay: { 432 delay: 5000 433 }, 434 thumbs: { 435 swiper: testimonialsThumb 436 }, 437 pagination: { 438 el: "#testimonials-one__carousel-pagination", 439 type: "bullets", 440 clickable: true 441 } 442 }); 443 } 444 if ($scope.find(".post-filter").length) { 445 var postFilterList = $scope.find(".post-filter li"); 446 // for first init 447 $scope.find(".filter-layout").isotope({ 448 filter: ".filter-item", 449 animationOptions: { 450 duration: 500, 451 easing: "linear", 452 queue: false 453 } 454 }); 455 // on click filter links 456 postFilterList.on("click", function () { 457 var Self = $(this); 458 var selector = Self.attr("data-filter"); 459 postFilterList.removeClass("active"); 460 Self.addClass("active"); 461 462 $scope.find(".filter-layout").isotope({ 463 filter: selector, 464 animationOptions: { 465 duration: 500, 466 easing: "linear", 467 queue: false 468 } 469 }); 470 return false; 471 }); 472 } 473 if ($scope.find(".curved-circle--item").length) {
474 $scope.find(".curved-circle--item").circleType(); 475 } 476 477 // Date Picker 478 if ($scope.find(".laboix-datepicker").length) { 479 $scope.find(".laboix-datepicker").each(function () { 480 $(this).datepicker(); 481 }); 482 } 483 484 if ($("#datepicker").length) { 485 $("#datepicker").datepicker(); 486 } 487 488 if ($("#datepicker2").length) { 489 $("#datepicker2").datepicker(); 490 } 491 492 laboix_stretch(); 493 494 function laboix_stretch() { 495 var i = $(window).width(); 496 $scope.find(".row .laboix-stretch-element-inside-column").each(function () { 497 var $this = $(this), 498 row = $this.closest(".row"), 499 cols = $this.closest('[class^="col-"]'), 500 colsheight = $this.closest('[class^="col-"]').height(), 501 rect = this.getBoundingClientRect(), 502 l = row[0].getBoundingClientRect(), 503 s = cols[0].getBoundingClientRect(), 504 r = rect.left, 505 d = i - rect.right, 506 c = l.left + (parseFloat(row.css("padding-left")) || 0), 507 u = i - l.right + (parseFloat(row.css("padding-right")) || 0), 508 p = s.left, 509 f = i - s.right, 510 styles = { 511 "margin-left": 0, 512 "margin-right": 0 513 }; 514 if (Math.round(c) === Math.round(p)) { 515 var h = parseFloat($this.css("margin-left") || 0); 516 styles["margin-left"] = h - r; 517 } 518 if (Math.round(u) === Math.round(f)) { 519 var w = parseFloat($this.css("margin-right") || 0); 520 styles["margin-right"] = w - d; 521 } 522 $this.css(styles); 523 }); 524 } 525 }; 526 527 var WidgetFaqHandler = function ($scope) { 528 if ($scope.find(".accrodion-grp").length) { 529 var accrodionGrp = $scope.find(".accrodion-grp"); 530 accrodionGrp.each(function () { 531 var accrodionName = $(this).data("grp-name"); 532 var Self = $(this); 533 var accordion = Self.find(".accrodion"); 534 Self.addClass(accrodionName); 535 Self.find(".accrodion .accrodion-content").hide(); 536 Self.find(".accrodion.active").find(".accrodion-content").show(); 537 accordion.each(function () { 538 $(this) 539 .find(".accrodion-title") 540 .on("click", function () { 541 if ($(this).parent().hasClass("active") === false) { 542 $scope.find(".accrodion-grp." + accrodionName) 543 .find(".accrodion") 544 .removeClass("active"); 545 $scope.find(".accrodion-grp." + accrodionName) 546 .find(".accrodion") 547 .find(".accrodion-content") 548 .slideUp(); 549 $(this).parent().addClass("active"); 550 $(this).parent().find(".accrodion-content").slideDown(); 551 } 552 }); 553 }); 554 }); 555 } 556 }; 557 558 if ($("#history-one__thumb").length) { 559 let testimonialsThumb = new Swiper("#history-one__thumb", { 560 slidesPerView: 5, 561 spaceBetween: 0, 562 speed: 1400, 563 watchSlidesVisibility: true, 564 watchSlidesProgress: true, 565 loop: true, 566 autoplay: { 567 delay: 5000 568 } 569 }); 570 571 let testimonialsCarousel = new Swiper("#history-one__carousel", { 572 observer: true, 573 observeParents: true, 574 loop: true, 575 speed: 1400, 576 mousewheel: false, 577 slidesPerView: 1, 578 spaceBetween: 72, 579 autoplay: { 580 delay: 5000 581 }, 582 thumbs: { 583 swiper: testimonialsThumb 584 }, 585 pagination: { 586 el: "#testimonials-one__carousel-pagination", 587 type: "bullets", 588 clickable: true 589 }, 590 591 navigation: { 592 nextEl: "#history-one__swiper-button-next", 593 prevEl: "#history-one__swiper-button-prev" 594 } 595 }); 596 } 597 598 //elementor front start 599 $(window).on("elementor/frontend/init", function () { 600 elementorFrontend.hooks.addAction( 601 "frontend/element_ready/widget", 602 WidgetDefaultHandler 603 ); 604 605 elementorFrontend.hooks.addAction( 606 "frontend/element_ready/laboix-faq.default", 607 WidgetFaqHandler 608 ); 609 }); 610 611 // login 612 $("#laboix-login").submit(function (event) { 613 event.preventDefault(); 614 615 var login = "action=signup_paragon¶m=login&" + $(this).serialize(); 616 $.ajax({
617 type: "POST", 618 url: laboix_login_object.ajaxurl, 619 data: login, 620 beforeSend: function () { 621 // setting a timeout 622 $(".login-result").addClass("loading"); 623 }, 624 success: function (data) { 625 $(".login-result").removeClass("loading"); 626 if (data.status == 2) { 627 $(".login-result").removeClass("alert alert-warning"); 628 $(".login-result").html(data.message).addClass("alert alert-success"); 629 window.location.href = laboix_login_object.login_redirect_url; 630 } else if (data.status == 1) { 631 $(".login-result").html(data.message).addClass("alert alert-warning"); 632 } else { 633 $(".login-result") 634 .html(laboix_login_object.message) 635 .addClass("alert alert-warning"); 636 } 637 } 638 }); 639 }); //end login 640 641 // register 642 $("#laboix-registration").submit(function (event) { 643 event.preventDefault(); 644 645 var signupForm = 646 "action=signup_paragon¶m=register&" + $(this).serialize(); 647 $.ajax({
648 type: "POST", 649 url: laboix_login_object.ajaxurl, 650 data: signupForm, 651 beforeSend: function () { 652 // setting a timeout 653 $(".registration-result").addClass("loading"); 654 }, 655 success: function (data) { 656 $(".registration-result").removeClass("loading"); 657 if (data.status == 2) { 658 $(".registration-result").removeClass("alert alert-warning"); 659 $(".registration-result") 660 .html(data.message) 661 .addClass("alert alert-success"); 662 window.location.href = laboix_login_object.registration_redirect_url; 663 } else { 664 $(".registration-result") 665 .html(data.message) 666 .addClass("alert alert-warning"); 667 } 668 } 669 }); 670 }); //end register 671})(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.