1jQuery(document).ready(function ($) { 2 "use strict"; 3 var $grid; 4 5 $('a[href=\\#]').on('click', function (e) { 6 e.preventDefault(); 7 }); 8 /*ISOTOPE HTML END*/ 9 10 /* Theia Side Bar */ 11 if (typeof ($.fn.theiaStickySidebar) !== "undefined") { 12 $('.has-sidebar .fixed-bar-coloum').theiaStickySidebar({'additionalMarginTop': 150}); 13 $('.shop-page .fixed-bar-coloum').theiaStickySidebar({'additionalMarginTop': 150}); 14 } 15 16 /* Header Search */ 17 $('a[href="#header-search"]').on("click", function (event) { 18 event.preventDefault(); 19 $("#header-search").addClass("open"); 20 $('#header-search > form > input[type="search"]').focus(); 21 }); 22 23 $("#header-search, #header-search button.close").on("click keyup", function ( 24 event 25 ) { 26 if ( 27 event.target === this || 28 event.target.className === "close" || 29 event.keyCode === 27 30 ) { 31 $(this).removeClass("open"); 32 } 33 }); 34 35 36 37 /* Scroll to top */ 38 $('.scrollup').on('click', function () { 39 $('html, body').animate({scrollTop: 0}, 800); 40 return false; 41 }); 42 43 $(window).on('scroll', function () { 44 if ($(window).scrollTop() > 200) { 45 $('.scrollup').addClass('back-top'); 46 } else { 47 $('.scrollup').removeClass('back-top'); 48 } 49 }); 50 51 /* Mobile menu */ 52 $(window).on('scroll', function () { 53 if ($(this).scrollTop() > 100) { 54 $("body").addClass("not-top"); 55 $("body").removeClass("top"); 56 } else { 57 $("body").addClass("top"); 58 $("body").removeClass("not-top"); 59 } 60 }); 61 62 /* Search Box */ 63 $(".search-box-area").on('click', '.search-button, .search-close', function (event) { 64 event.preventDefault(); 65 if ($('.search-text').hasClass('active')) { 66 $('.search-text, .search-close').removeClass('active'); 67 } else { 68 $('.search-text, .search-close').addClass('active'); 69 } 70 return false; 71 }); 72 73 /* Header Right Menu */ 74 var menuArea = $('.additional-menu-area'); 75 menuArea.on('click', '.side-menu-trigger', function (e) { 76 e.preventDefault(); 77 var self = $(this); 78 if (self.hasClass('side-menu-open')) { 79 $('.sidenav').css('transform', 'translateX(0%)'); 80 if (!menuArea.find('> .rt-cover').length) { 81 menuArea.append("<div class='rt-cover'></div>"); 82 } 83 self.removeClass('side-menu-open').addClass('side-menu-close'); 84 } 85 }); 86 87 function closeMenuArea() { 88 var trigger = $('.side-menu-trigger', menuArea); 89 trigger.removeClass('side-menu-close').addClass('side-menu-open'); 90 if (menuArea.find('> .rt-cover').length) { 91 menuArea.find('> .rt-cover').remove(); 92 } 93 $('.sidenav').css('transform', 'translateX(100%)'); 94 } 95 96 menuArea.on('click', '.closebtn', function (e) { 97 e.preventDefault(); 98 closeMenuArea(); 99 }); 100 101 $(document).on('click', '.rt-cover', function () { 102 closeMenuArea(); 103 }); 104 105 /*------------------------------------- 106 MeanMenu activation code 107 --------------------------------------*/ 108 var a = $('.offscreen-navigation .menu'); 109 110 if (a.length) { 111 a.children("li").addClass("menu-item-parent"); 112 a.find(".menu-item-has-children > a").on("click", function (e) { 113 e.preventDefault(); 114 $(this).toggleClass("opened"); 115 var n = $(this).next(".sub-menu"), 116 s = $(this).closest(".menu-item-parent").find(".sub-menu"); 117 a.find(".sub-menu").not(s).slideUp(250).prev('a').removeClass('opened'), n.slideToggle(250) 118 }); 119 a.find('.menu-item:not(.menu-item-has-children) > a').on('click', function (e) { 120 $('.rt-slide-nav').slideUp(); 121 $('body').removeClass('slidemenuon'); 122 }); 123 } 124 125 $('.mean-bar .sidebarBtn').on('click', function (e) { 126 e.preventDefault(); 127 if ($('.rt-slide-nav').is(":visible")) { 128 $('.rt-slide-nav').slideUp(); 129 $('body').removeClass('slidemenuon'); 130 } else { 131 $('.rt-slide-nav').slideDown(); 132 $('body').addClass('slidemenuon'); 133 } 134 135 });
136 /*Header and mobile menu stick*/ 137 $(window).on('scroll', function () { 138 if ($('body').hasClass('sticky-header')) { 139 140 // Sticky header 141 var stickyPlaceHolder = $("#rt-sticky-placeholder"), 142 menu = $("#header-menu"), 143 menuH = menu.outerHeight(), 144 topHeaderH = $('#tophead').outerHeight() || 0, 145 middleHeaderH = $('#middleHeader').outerHeight() || 0, 146 targrtScroll = topHeaderH + middleHeaderH; 147 if ($(window).scrollTop() > targrtScroll) { 148 menu.addClass('rt-sticky'); 149 stickyPlaceHolder.height(menuH); 150 } else { 151 menu.removeClass('rt-sticky'); 152 stickyPlaceHolder.height(0); 153 } 154 155 // Sticky mobile header 156 var stickyPlaceHolder = $("#mobile-sticky-placeholder"), 157 menubar = $("#mobile-men-bar"), 158 menubarH = menubar.outerHeight(), 159 topHeaderH = $('#mobile-top-fix').outerHeight() || 0, 160 total_height =topHeaderH; 161 if ($(window).scrollTop() > total_height) { 162 $("#meanmenu").addClass('mobile-sticky'); 163 stickyPlaceHolder.height(menubarH); 164 } else { 165 $("#meanmenu").removeClass('mobile-sticky'); 166 stickyPlaceHolder.height(0); 167 } 168 } 169 }); 170 171 /* Woocommerce Shop change view */ 172 $('#shop-view-mode li a').on('click', function () { 173 $('body').removeClass('product-grid-view').removeClass('product-list-view'); 174 175 if ($(this).closest('li').hasClass('list-view-nav')) { 176 $('body').addClass('product-list-view'); 177 Cookies.set('shopview', 'list'); 178 } else { 179 $('body').addClass('product-grid-view'); 180 Cookies.remove('shopview'); 181 } 182 return false; 183 }); 184 185 // Popup - Used in video 186 if (typeof $.fn.magnificPopup == 'function') { 187 $('.rt-video-popup').magnificPopup({ 188 type: 'iframe', 189 mainClass: 'mfp-fade', 190 removalDelay: 160, 191 preloader: false, 192 fixedContentPos: false 193 }); 194 } 195 if (typeof $.fn.magnificPopup == 'function') { 196 if ($('.zoom-gallery').length) { 197 $('.zoom-gallery').each(function () { // the containers for all your galleries 198 $(this).magnificPopup({ 199 delegate: 'a.finbuzz-popup-zoom', // the selector for gallery item 200 type: 'image', 201 gallery: { 202 enabled: true 203 } 204 }); 205 }); 206 } 207 } 208 /* when product quantity changes, update quantity attribute on add-to-cart button */ 209 $("form.cart").on("change", "input.qty", function () { 210 if (this.value === "0") 211 this.value = "1"; 212 213 $(this.form).find("button[data-quantity]").data("quantity", this.value); 214 }); 215 216 /* remove old "view cart" text, only need latest one thanks! */ 217 $(document.body).on("adding_to_cart", function () { 218 $("a.added_to_cart").remove(); 219 }); 220 221 /*variable ajax cart end*/ 222 $('.quantity').on('click', '.plus', function (e) { 223 var self = $(this), 224 $input = self.prev('input.qty'), 225 target = self.parents('form').find('.type-product'), 226 val = parseInt($input.val(), 10); 227 if (Number.isNaN(val)) { 228 val = 0; 229 } 230 val = val + 1; 231 target.attr("data-quantity", val); 232 $input.val(val); 233 return false; 234 }); 235 $('.quantity').on('click', '.minus', function (e) { 236 var self = $(this), 237 $input = self.next('input.qty'), 238 target = self.parents('form').find('.type-product'), 239 val = parseInt($input.val(), 10); 240 val = (val >= 1) ? val - 1 : val; 241 target.attr("data-quantity", val); 242 $input.val(val); 243 return false; 244 });
245 $('.quantity-btn').on('click', function(){ 246 $("button[name='update_cart']").prop('disabled', false); 247 }); 248 249 if( $('.header-shop-cart').length ){ 250 $( document ).on('click', '.remove-cart-item', function(){ 251 var product_id = $(this).attr("data-product_id"); 252 var loader_url = $(this).attr("data-url"); 253 var main_parent = $(this).parents('li.menu-item.dropdown'); 254 var parent_li = $(this).parents('li.cart-item'); 255 parent_li.find('.remove-item-overlay').css({'display':'block'}); 256 $.ajax({ 257 type: 'post', 258 dataType: 'json', 259 url: finbuzzObj.ajaxURL, 260 data: { action: "neeon_product_remove", 261 product_id: product_id 262 },success: function(data){ 263 main_parent.html( data["mini_cart"] ); 264 $( document.body ).trigger( 'wc_fragment_refresh' ); 265 },error: function(xhr, status, error) { 266 $('.header-shop-cart').children('ul.minicart').html('<li class="cart-item"><p class="cart-update-pbm text-center">'+ finbuzzObj.cart_update_pbm +'</p></li>'); 267 } 268 }); 269 return false; 270 }); 271 } 272 // Wishlist 273 $(document).on('click', '.rdtheme-wishlist-icon', function () { 274 275 if ($(this).hasClass('rdtheme-add-to-wishlist') && typeof yith_wcwl_l10n != "undefined") { 276 277 var $obj = $(this), 278 productId = $obj.data('product-id'), 279 afterTitle = $obj.data('title-after'); 280 var data = { 281 'action': 'finbuzz_add_to_wishlist', 282 'context': 'frontend', 283 'nonce': $obj.data('nonce'), 284 'add_to_wishlist': productId 285 }; 286 287 $.ajax({
288 url: yith_wcwl_l10n.ajax_url, 289 type: 'POST', 290 data: data, 291 success: function success(data) { 292 if (data['result'] != 'error') { 293 $obj.removeClass('ajaxloading'); 294 $obj.find('.wishlist-icon').removeClass('fa fa-heart').addClass('fas fa-heart').show(); 295 $obj.removeClass('rdtheme-add-to-wishlist').addClass('rdtheme-remove-from-wishlist'); 296 $obj.find('span').html(afterTitle); 297 $('body').trigger('rt_added_to_wishlist', [productId]); 298 } else { 299 console.log(data['message']); 300 } 301 } 302 }); 303 304 return false; 305 } 306 }); 307}); 308 309//function Load 310function finbuzz_content_load_scripts() { 311 var $ = jQuery; 312 //Preloader 313 314 $('#preloader').fadeOut('slow', function () { 315 $(this).remove(); 316 }); 317 318 319 /*------------------------------------- 320 Slick Slider 321 -------------------------------------*/ 322 $('.slick-carousel').each(function() { 323 $('.slick-carousel').not('.slick-initialized').slick(); 324 }); 325 326 /*--------------------------------------- 327 Background Parallax 328 --------------------------------------- */ 329 if ($(".rt-parallax-bg-yes").length) { 330 $(".rt-parallax-bg-yes").each(function () { 331 var speed = $(this).data('speed'); 332 $(this).parallaxie({ 333 speed: speed ? speed : 0.5, 334 offset: 0, 335 }); 336 }) 337 } 338 339 /*=================================== 340 // Main Banner 341 =====================================*/ 342 $('.main-banner-slider').each(function() { 343 var $this = $(this); 344 var settings = $(this).data('options'); 345 var autoplayconditon = settings['auto']; 346 var $pagination = $this.find('.swiper-pagination')[0]; 347 var $next = $this.find('.swiper-button-next')[0]; 348 var $prev = $this.find('.swiper-button-prev')[0]; 349 var mainSlider = new Swiper(this, { 350 slidesPerView: 1, 351 loop: settings['loop'], 352 slideToClickedSlide: true, 353 effect: "fade", 354 autoplay:autoplayconditon, 355 autoplayTimeout:settings['autoplay']['delay'], 356 speed:settings['speed'], 357 navigation: { 358 nextEl: $next, 359 prevEl: $prev, 360 }, 361 pagination: { 362 el: $pagination, 363 type: 'bullets', 364 clickable:'true', 365 }, 366 }); 367 mainSlider.init(); 368 369 }); 370 371 /*=================================== 372 // Main Banner 373 =====================================*/ 374 $('.main-banner-slider3').each(function() { 375 var $this = $(this); 376 var settings = $(this).data('options'); 377 var autoplayconditon = settings['auto']; 378 var $next = $this.find('.swiper-button-next')[0]; 379 var $prev = $this.find('.swiper-button-prev')[0]; 380 var mainSlider3 = new Swiper(this, { 381 slidesPerView: 1, 382 loop: settings['loop'], 383 slideToClickedSlide: true, 384 autoplay:autoplayconditon, 385 autoplayTimeout:settings['autoplay']['delay'], 386 speed:settings['speed'], 387 navigation: { 388 nextEl: $next, 389 prevEl: $prev, 390 }, 391 }); 392 mainSlider3.init(); 393 394}); 395 396 /*=================================== 397 // Section background image 398 ====================================*/ 399 imageFunction(); 400 401 function imageFunction() { 402 $("[data-bg-image]").each(function () { 403 let img = $(this).data("bg-image"); 404 $(this).css({ 405 backgroundImage: "url(" + img + ")", 406 }); 407 }); 408 } 409 410 /*====================================== 411 //TweenMax Mouse Effect 412 ====================================*/ 413 $(".motion-effects-wrap").mousemove(function (e) { 414 parallaxIt(e, ".motion-effects1", -100); 415 parallaxIt(e, ".motion-effects2", -200); 416 parallaxIt(e, ".motion-effects3", 100); 417 parallaxIt(e, ".motion-effects4", 200);
418 parallaxIt(e, ".motion-effects5", -50); 419 parallaxIt(e, ".motion-effects6", 50); 420 }); 421 function parallaxIt(e, target_class, movement) { 422 let $wrap = $(e.target).parents(".motion-effects-wrap"); 423 if (!$wrap.length) return; 424 let $target = $wrap.find(target_class); 425 let relX = e.pageX - $wrap.offset().left; 426 let relY = e.pageY - $wrap.offset().top; 427 TweenMax.to($target, 1, { 428 x: ((relX - $wrap.width() / 2) / $wrap.width()) * movement, 429 y: ((relY - $wrap.height() / 2) / $wrap.height()) * movement, 430 }); 431 } 432 433 434 /*================================= 435 // counter up 436 ==================================*/ 437 438 let counter=true; 439 $(".counter-appear").appear(); 440 $(".counter-appear").on("appear", function () { 441 if (counter) { 442 // Only number counter 443 $(".counterUp").each(function () { 444 var $this = $(this); 445 let duration=$(this).data('duration'); 446 jQuery({ 447 Counter: 0, 448 }).animate( 449 { 450 Counter: $this.attr("data-counter"), 451 }, 452 { 453 duration: duration, 454 easing: "swing", 455 step: function () { 456 var num = Math.ceil(this.Counter).toString(); 457 if (Number(num) > 99999) { 458 while (/(\d+)(\d{3})/.test(num)) { 459 num = num.replace(/(\d+)(\d{3})/, ""); 460 } 461 } 462 $this.html(num); 463 }, 464 } 465 ); 466 }); 467 468 // pie chart 469 $(".chart-bar").each(function(){ 470 let circleSettings=$(this).data('circle-options'); 471 $(this).easyPieChart({ 472 barColor: circleSettings.fg_color, 473 trackColor: circleSettings.bg_color, 474 scaleColor: false, 475 lineWidth: circleSettings.circle_border_size, 476 size: circleSettings.circle_size, 477 lineCap: "square", 478 animate: circleSettings.animation_speed, 479 }); 480 }); 481 counter = false; 482 } 483 }); 484 485 //initialize swiper when document ready 486 $('.rt-swiper-container').each(function () { 487 var swiper = $(this), 488 autoplay = swiper.data('autoplay'), 489 autoplayDelay = swiper.data('autoplay-timeout') || '', 490 speed = swiper.data('speed') || '', 491 loop = swiper.data('loop') || true, 492 slidesPerView = swiper.data('slides-per-view') || 1, 493 spaceBetween = swiper.data('space-between'), 494 centeredSlides = swiper.data('centered-slides'), 495 rXsmall = swiper.data("r-x-small"), 496 rSmall = swiper.data("r-small"), 497 rMedium = swiper.data("r-medium"), 498 rLarge = swiper.data("r-large"), 499 rXlarge = swiper.data("r-x-large"); 500 console.log(slidesPerView); 501 var $swiper = new Swiper('.rt-swiper-container', { 502 // Optional parameters 503 autoplay: autoplay ? {delay:autoplayDelay} : false, 504 speed: speed ? speed : 2000, 505 loop: loop ? true : false, 506 slidesPerView: slidesPerView ? slidesPerView : 1, 507 spaceBetween: spaceBetween ? spaceBetween : 10, 508 centeredSlides: centeredSlides ? true : false, 509 pagination: { 510 el: '.swiper-pagination', 511 clickable: true, 512 }, 513 navigation: { 514 nextEl: '.swiper-button-next', 515 prevEl: '.swiper-button-prev', 516 }, 517 breakpoints: { 518 0: { 519 slidesPerView: rXsmall ? rXsmall : 1, 520 }, 521 576: { 522 slidesPerView: rSmall ? rSmall : 2, 523 }, 524 768: { 525 slidesPerView: rMedium ? rMedium : 3, 526 }, 527 992: { 528 slidesPerView: rLarge ? rLarge : 4, 529 }, 530 1200: { 531 slidesPerView: rXlarge ? rXlarge : 1, 532 } 533 } 534 }); 535 });
536 537 $('.rt-related-slider').each(function() { 538 var $this = $(this); 539 var settings = $this.data('xld'); 540 var autoplayconditon= settings['auto']; 541 var $pagination = $this.find('.swiper-pagination')[0]; 542 var $next = $this.find('.swiper-button-next')[0]; 543 var $prev = $this.find('.swiper-button-prev')[0]; 544 var swiper = new Swiper( this, { 545 autoplay: autoplayconditon, 546 autoplayTimeout: settings['autoplay']['delay'], 547 speed: settings['speed'], 548 loop: settings['loop'], 549 pauseOnMouseEnter :true, 550 slidesPerView: settings['slidesPerView'], 551 spaceBetween: settings['spaceBetween'], 552 centeredSlides: settings['centeredSlides'], 553 slidesPerGroup: settings['slidesPerGroup'] ? settings['slidesPerGroup']:1, 554 pagination: { 555 el: $pagination, 556 clickable: true, 557 type: 'bullets', 558 }, 559 navigation: { 560 nextEl: $next, 561 prevEl: $prev, 562 }, 563 breakpoints: { 564 0: { 565 slidesPerView: settings['breakpoints']['0']['slidesPerView'], 566 }, 567 576: { 568 slidesPerView: settings['breakpoints']['576']['slidesPerView'], 569 }, 570 768: { 571 slidesPerView: settings['breakpoints']['768']['slidesPerView'], 572 }, 573 992: { 574 slidesPerView: settings['breakpoints']['992']['slidesPerView'], 575 }, 576 1200: { 577 slidesPerView: settings['breakpoints']['1200']['slidesPerView'], 578 }, 579 1600: { 580 slidesPerView: settings['breakpoints']['1600']['slidesPerView'], 581 }, 582 }, 583 }); 584 swiper.init(); 585 }); 586 587 // pricing swithces 588 var pricingWrapper = $(".pricing-wrapper"); 589 if (pricingWrapper) { 590 $(".pricing-wrapper").each(function () { 591 $(".pricing-switch-container").on("click", function () { 592 $(".pricing-switch") 593 .parents(".price-switch-box") 594 .toggleClass("price-switch-box--active"), 595 $(".pricing-switch").toggleClass("pricing-switch-active"), 596 $(".price-box").toggleClass("price-box-show price-box-hide"); 597 }); 598 }); 599 } 600 601 /*------------------------------------- 602 Intersection Observer 603 -------------------------------------*/ 604 if (!!window.IntersectionObserver) { 605 let observer = new IntersectionObserver((entries, observer) => { 606 entries.forEach(entry => { 607 if (entry.isIntersecting) { 608 entry.target.classList.add("active-animation"); 609 observer.unobserve(entry.target); 610 } 611 }); 612 }, { 613 rootMargin: "0px 0px -100px 0px" 614 }); 615 document.querySelectorAll('.has-animation').forEach(block => { 616 observer.observe(block) 617 }); 618 } else { 619 document.querySelectorAll('.has-animation').forEach(block => { 620 block.classList.remove('has-animation') 621 }); 622 } 623 624 /*------------------------------------- 625 Masonry 626 -------------------------------------*/ 627 628 var galleryIsoContainer = $(".rt-portfolio-masonary"); 629 if (galleryIsoContainer.length) { 630 var imageGallerIso = galleryIsoContainer.imagesLoaded(function () { 631 imageGallerIso.isotope({ 632 itemSelector: ".rt-portfolio-item", 633 percentPosition: true, 634 isAnimated: true, 635 masonry: { 636 columnWidth: ".rt-portfolio-item", 637 }, 638 animationOptions: { 639 duration: 700, 640 easing: 'linear', 641 queue: false 642 } 643 }); 644 }); 645 } 646 647 /* Wow Js Init */ 648 var wow = new WOW({ 649 boxClass: 'wow', 650 animateClass: 'animated', 651 offset: 0, 652 mobile: false, 653 live: true, 654 scrollContainer: null, 655 });
656 657 new WOW().init(); 658 659 /**Load More Portfolio Button */ 660 var page = 2; 661 $('#loadMore').click(function(){ 662 let main = $(this).data('port-items'); 663 var $container = jQuery('.portfolio-items'); 664 $.ajax({ 665 type : "post", 666 url : finbuzzObj.ajaxURL, 667 data : { 668 action: "loadmore_ajax", 669 postitem : main['item'], 670 postcat:main['cat'], 671 colclass:main['col_class'], 672 excerptDisplay:main['excerpt_display'], 673 excerptCount:main['excerpt_count'], 674 portSerDisplay:main['port_serial_dis'], 675 titleCount:main['title_count'], 676 catDisplay:main['cat_display'], 677 readMore:main['read_more_btn_dis'], 678 pageNumber: page 679 }, 680 success : function(html){ 681 var $data = jQuery(html); 682 if ($data.length) { 683 $container.append( html ); 684 jQuery('#loadMore').removeClass('loading-lazy'); 685 } else { 686 jQuery("#loadMore").html("No More Portfolio"); 687 jQuery('#loadMore').removeClass('loading-lazy'); 688 } 689 setTimeout( function() { 690 revealPosts(); 691 }, 500); 692 }, 693 694 }); 695 page++; 696 697 }); 698 699 function revealPosts(){ 700 var posts = $('.single-grid-item:not(.reveal)'); 701 var i = 0; 702 setInterval( function(){ 703 if ( i >= posts.length) return false; 704 var el = posts[i]; 705 $(el).addClass('reveal'); 706 i++ 707 }, 100); 708 } 709 710 711} 712 713(function ($) { 714 "use strict"; 715 716 // Window Load+Resize 717 $(window).on('load resize', function () { 718 719 // Define the maximum height for mobile menu 720 var wHeight = $(window).height(); 721 wHeight = wHeight - 50; 722 $('.mean-nav > ul').css('max-height', wHeight + 'px'); 723 724 }); 725 726 // Elementor Frontend Load 727 $(window).on('elementor/frontend/init', function () { 728 if (elementorFrontend.isEditMode()) { 729 elementorFrontend.hooks.addAction('frontend/element_ready/widget', function () { 730 finbuzz_content_load_scripts(); 731 }); 732 } 733 }); 734 735 // Window Load 736 $(window).on('load', function () { 737 finbuzz_content_load_scripts(); 738 }); 739 740})(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.