1(function () { 2 "use strict" 3 4 AOS.init(); 5 var $window = $(window), 6 $document = $(document); 7 8 var qTheme = { 9 isElementInViewport: function (el) { 10 if (typeof jQuery === "function" && el instanceof jQuery) { 11 el = el[0]; 12 } 13 var rect = el.getBoundingClientRect(); 14 return ( 15 rect.top >= 0 && 16 rect.top <= (window.innerHeight || document.documentElement.clientHeight) 17 ); 18 }, 19 stickyNav: function () { 20 $('body.sticky-nav .navigation') 21 [$window.scrollTop() ? 'addClass' : 'removeClass'] 22 ('sticky'); 23 } 24 } 25 26 window.qTheme = qTheme; 27 28 $window.on('load', function () { 29 qTheme.stickyNav(); 30 31 $window.on('scroll resize', function () { 32 qTheme.stickyNav(); 33 }); 34 }); 35 36 $document.ready(function () { 37 if ($(document.body).hasClass('sticky-nav')) { 38 var navHeight = $('.navigation').outerHeight(); 39 qTheme.stickyNav(); 40 } 41 42 $('.js-menu-toggle').on('click', function () { 43 $('html').toggleClass('mobile-menu-active'); 44 }); 45 46 47 /*$(document.body).on('click', function (e) { 48 var curr = $(e.target) 49 if (curr.parents('.menu,.toggle').length === 0) { 50 $('html').removeClass('mobile-menu-active'); 51 } 52 53 });*/ 54 55 $(".navigation .menu li").each(function () { 56 if ($(this.children).filter('ul').length > 0) { 57 $(this).addClass('has-sub-menu'); 58 } 59 }); 60 61 62 // $(".has-sub-menu > a").on("click", function (e) { 63 // if(!$(this).hasClass("enable-mega-menu")) { 64 // var parent = $(this).parent(); 65 // var ul = parent.children('ul'); 66 // console.log(ul); 67 // if (ul.length === 1 && matchMedia("(max-width: 1450px)").matches) { 68 // e.preventDefault(); 69 // ul.slideToggle(function () { 70 // if (this.style.display == 'none') { 71 // this.style.display = ''; 72 // } 73 // }); 74 // } 75 // } 76 // }); 77 // 78 // $('.dropdown-toggle').dropdown() 79 }); 80 81 82 83 /* ###################### Counter ###################### */ 84 var numbCount = function (el) { 85 var html = el.innerHTML.trim(); 86 var to = parseInt(html, 10); 87 var inc = 120; 88 if (to > 20) inc = 60; 89 if (to > 60) inc = 40; 90 if (to > 120) inc = 10; 91 if (to > 320) inc = 5; 92 if (to > 1220) inc = 3; 93 if (to > 5000) inc = 1; 94 if (!isNaN(to)) { 95 var time = 10; 96 for (var i = 1; i <= to; i++) { 97 time += inc; 98 (function (time, i, el) { 99 setTimeout(function () { 100 el.innerHTML = i; 101 }, time) 102 })(time, i, el) 103 } 104 } 105 } 106 107 $.fn.isOnScreen = function () { 108 var win = $window; 109 110 var viewport = { 111 top: win.scrollTop(), 112 left: win.scrollLeft() 113 }; 114 viewport.right = viewport.left + win.width(); 115 viewport.bottom = viewport.top + win.height(); 116 117 var bounds = this.offset(); 118 bounds.right = bounds.left + this.outerWidth(); 119 bounds.bottom = bounds.top + this.outerHeight(); 120 121 return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); 122 }; 123 124 125 $window.on('load resize scroll', function () { 126 setTimeout(function () { 127 $('[data-counter]').each(function () { 128 if ($(this).isOnScreen()) { 129 $(this).css({'visibility': 'visible'}); 130 $(this).removeClass('js-start-from-zero'); 131 if (!this.__activated) { 132 133 this.__activated = true; 134 numbCount(this); 135 } 136 } 137 }); 138 }, 10); 139 140 $(".menu").css('maxHeight', ($window.height() - $(".navigation").outerHeight())) 141 }); 142 143 144 /* ###################### Tabs ###################### */ 145 $document.ready(function () { 146 var numTabs = $('.tabs .nav-tabs:not(.as-buttons)').find('li').length; 147 var tabWidth = 100 / numTabs; 148 var tabPercent = tabWidth + "%"; 149 $('.nav-tabs li').width(tabPercent); 150 }); 151 /* ###################### Tabs ###################### */ 152 153 /* ###################### Elevate Zoom ###################### */ 154 $document.ready(function () { 155 156 var elevateZoomTurnOn = $document.width() > 991 ? true : false;
157 158 if (elevateZoomTurnOn) { 159 $("#elevatezoom").elevateZoom({ 160 gallery: 'elevatezoom-gallery', 161 cursor: "crosshair", 162 galleryActiveClass: 'active', 163 imageCrossfade: true, 164 zoomType: "inner" 165 }); 166 167 168 //pass the images to Fancybox 169 $("#elevatezoom").bind("click", function (e) { 170 var ez = $('#elevatezoom').data('elevateZoom'); 171 172 var res = []; 173 $.each(ez.getGalleryList(), function () { 174 res.push({src: this.href}) 175 }); 176 177 $.magnificPopup.open({ 178 items: res, 179 gallery: { 180 enabled: true 181 }, 182 type: 'image' 183 }); 184 185 return false; 186 }); 187 } 188 189 var eGallery = $('#elevatezoom-gallery'); 190 if (eGallery.length > 0) { 191 eGallery.each(function () { 192 var el = $(this); 193 el.slick({ 194 centerMode: false, 195 centerPadding: '0', 196 slidesToShow: 4, 197 slidesToScroll: 1, 198 arrows: true, 199 autoplay: false, 200 autoplaySpeed: 2000, 201 dots: false, 202 infinite: true, 203 responsive: [ 204 { 205 breakpoint: 767, 206 settings: { 207 slidesToShow: 2 208 } 209 } 210 ] 211 }); 212 }); 213 } 214 }); 215 /* ###################### Elevate Zoom ###################### */ 216 217 /* ###################### Home Slider ###################### */ 218 /*$document.ready(function () { 219 var homeSlider = $('.home-slider'); 220 if (homeSlider.length > 0) { 221 homeSlider.each(function () { 222 var el = $(this); 223 el.slick({ 224 centerMode: false, 225 centerPadding: '0px', 226 slidesToShow: 1, 227 arrows: true, 228 autoplay: false, 229 autoplaySpeed: 2000, 230 dots: true 231 }); 232 }); 233 } 234 });*/ 235 /* ###################### Home Slider ###################### */ 236 /* ###################### Product Slider ###################### */ 237 /* $document.ready(function () { 238 var homeSlider = $('.product-slider'); 239 if (homeSlider.length > 0) { 240 homeSlider.each(function () { 241 var el = $(this); 242 el.slick({ 243 centerMode: false, 244 centerPadding: '0px', 245 slidesToShow: 1, 246 arrows: true, 247 autoplay: false, 248 autoplaySpeed: 2000, 249 dots: true 250 }); 251 }); 252 } 253 });*/ 254 /* ###################### Product Slider ###################### */ 255 /* ###################### Section 4 and 5 padding ###################### */ 256 257 function setPaddingToSections() { 258 if ($window.width() > 991) { 259 var headerWidth = $('.navigation-holder').width(); 260 var headerContainerWidth = $('.navigation-holder .navigation .container').width(); 261 $('.section-4').each(function () { 262 var leftSide = $(this).find('.left-side'); 263 leftSide.css({'padding-left': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 264 }) 265 $('.section-5').each(function () { 266 var leftSide = $(this).find('.right-side'); 267 leftSide.css({'padding-right': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 268 }) 269 $('.section-32').each(function () { 270 var leftSide = $(this).find('.left-side'); 271 leftSide.css({'padding-left': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 272 }) 273 $('.section-33').each(function () { 274 var leftSide = $(this).find('.right-side'); 275 leftSide.css({'padding-right': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 276 }) 277 278 $('.section-35').each(function () { 279 var leftSide = $(this).find('.left-side'); 280 var rightSide = $(this).find('.img-holder'); 281 leftSide.css({'padding-left': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 282 rightSide.css({'padding-right': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 283 }) 284 $('.section-37').each(function () { 285 var rightSide = $(this).find('.right-side'); 286 var leftSide = $(this).find('.img-holder'); 287 leftSide.css({'padding-left': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 288 rightSide.css({'padding-right': ((headerWidth - headerContainerWidth ) / 2) + 10 + 'px'}); 289 }) 290 } else { 291 $('.section-4').each(function () { 292 var leftSide = $(this).find('.left-side'); 293 leftSide.css({'padding-left': ''}); 294 }) 295 $('.section-5').each(function () { 296 var leftSide = $(this).find('.right-side'); 297 leftSide.css({'padding-right': ''}); 298 }) 299 $('.section-32').each(function () { 300 var leftSide = $(this).find('.left-side'); 301 leftSide.css({'padding-left': ''}); 302 }) 303 $('.section-33').each(function () { 304 var leftSide = $(this).find('.right-side'); 305 leftSide.css({'padding-right': ''}); 306 }) 307 308 $('.section-35').each(function () { 309 var leftSide = $(this).find('.left-side'); 310 var rightSide = $(this).find('.img-holder'); 311 leftSide.css({'padding-left': ''}); 312 rightSide.css({'padding-right': ''}); 313 }) 314 315 $('.section-37').each(function () { 316 var rightSide = $(this).find('.right-side'); 317 var leftSide = $(this).find('.img-holder'); 318 leftSide.css({'padding-left': ''}); 319 rightSide.css({'padding-right': ''}); 320 }) 321 } 322 } 323 324 $document.ready(function () { 325 setPaddingToSections(); 326 }); 327 328 $window.on('resize', function () { 329 setPaddingToSections(); 330 }); 331 /* ###################### Section 4 and 5 padding ###################### */ 332 333 /* ###################### Top Top ###################### */ 334 $document.ready(function () { 335 var ttopButton = $("#to-top"); 336 ttopButton.hide().on("click", function () { 337 $("html, body").animate({ 338 scrollTop: 0 339 }, "slow"); 340 }); 341 $window.scroll(function () { 342 if ($window.scrollTop() === 0) { 343 ttopButton.hide(); 344 } else { 345 ttopButton.show(); 346 } 347 }); 348 }); 349 /* ###################### To Top ###################### */ 350 351 /* ###################### Google Maps ###################### */ 352 $document.ready(function () { 353 if ($('#map').length > 0) { 354 var latitude = 42.662104; 355 var longitude = 23.3163666; 356 var isDraggable = $document.width() > 991 ? true : false; // If document (your website) is wider than 480px, isDraggable = true, else isDraggable = false 357 358 var locations = [ 359 ['', latitude, longitude, 2] 360 ]; 361 var styles = [ 362 { 363 "featureType": "all", 364 "elementType": "labels.text.fill", 365 "stylers": [ 366 { 367 "saturation": 36 368 }, 369 { 370 "color": "#000000" 371 }, 372 { 373 "lightness": 40 374 } 375 ] 376 }, 377 { 378 "featureType": "all", 379 "elementType": "labels.text.stroke", 380 "stylers": [ 381 { 382 "visibility": "on" 383 }, 384 { 385 "color": "#000000" 386 }, 387 { 388 "lightness": 16 389 } 390 ] 391 }, 392 { 393 "featureType": "all", 394 "elementType": "labels.icon", 395 "stylers": [ 396 { 397 "visibility": "off" 398 } 399 ] 400 }, 401 { 402 "featureType": "administrative", 403 "elementType": "geometry.fill", 404 "stylers": [ 405 { 406 "color": "#000000" 407 }, 408 { 409 "lightness": 20 410 } 411 ] 412 }, 413 { 414 "featureType": "administrative", 415 "elementType": "geometry.stroke", 416 "stylers": [ 417 { 418 "color": "#000000" 419 }, 420 { 421 "lightness": 17 422 }, 423 { 424 "weight": 1.2 425 } 426 ] 427 }, 428 { 429 "featureType": "landscape", 430 "elementType": "geometry", 431 "stylers": [ 432 { 433 "color": "#000000" 434 }, 435 { 436 "lightness": 20 437 } 438 ] 439 }, 440 { 441 "featureType": "poi", 442 "elementType": "geometry", 443 "stylers": [ 444 { 445 "color": "#000000" 446 }, 447 { 448 "lightness": 21 449 } 450 ] 451 }, 452 { 453 "featureType": "road.highway", 454 "elementType": "geometry.fill", 455 "stylers": [ 456 { 457 "color": "#000000" 458 }, 459 { 460 "lightness": 17 461 } 462 ] 463 }, 464 { 465 "featureType": "road.highway", 466 "elementType": "geometry.stroke", 467 "stylers": [ 468 { 469 "color": "#000000" 470 }, 471 { 472 "lightness": 29 473 }, 474 { 475 "weight": 0.2 476 } 477 ] 478 }, 479 { 480 "featureType": "road.arterial", 481 "elementType": "geometry", 482 "stylers": [ 483 { 484 "color": "#000000" 485 }, 486 { 487 "lightness": 18 488 } 489 ] 490 }, 491 { 492 "featureType": "road.local", 493 "elementType": "geometry", 494 "stylers": [ 495 { 496 "color": "#000000" 497 }, 498 { 499 "lightness": 16 500 } 501 ] 502 }, 503 { 504 "featureType": "transit", 505 "elementType": "geometry", 506 "stylers": [ 507 { 508 "color": "#000000" 509 }, 510 { 511 "lightness": 19 512 } 513 ] 514 }, 515 { 516 "featureType": "water", 517 "elementType": "geometry", 518 "stylers": [ 519 { 520 "color": "#000000" 521 }, 522 { 523 "lightness": 17 524 } 525 ] 526 } 527 ]; 528 529 var map = new google.maps.Map(document.getElementById('map'), { 530 zoom: 17, 531 scrollwheel: false, 532 navigationControl: true, 533 mapTypeControl: false, 534 scaleControl: false, 535 draggable: isDraggable, 536 styles: styles, 537 center: new google.maps.LatLng(latitude, longitude), 538 mapTypeId: google.maps.MapTypeId.ROADMAP 539 }); 540 var infowindow = new google.maps.InfoWindow(); 541 var marker, i; 542 for (i = 0; i < locations.length; i++) { 543 marker = new google.maps.Marker({ 544 position: new google.maps.LatLng(locations[i][1], locations[i][2]), 545 map: map, 546 icon: 'assets/img/section-16/marker.png' 547 }); 548 google.maps.event.addListener(marker, 'click', (function (marker, i) { 549 return function () { 550 infowindow.setContent(locations[i][0]); 551 } 552 })(marker, i)); 553 } 554 } 555 }); 556 /* ###################### Google Maps ###################### */ 557 558 /* ###################### Masonry Gallery with Magnific Popup ###################### */ 559 var masonryGrid = $('.masonry-gallery .js-masonry-grid-works'); 560 561 562 $window.on('load', function () { 563 // masonry grid 564 setTimeout(function () { 565 masonryGrid.masonry({ 566 itemSelector: '.js-masonry-grid-works__item', 567 columnWidth: '.js-masonry-grid-works__sizer', 568 percentPosition: true 569 }).isotope(); 570 }, 10); 571 }); 572 573 $document.ready(function () { 574 // isotope filtering panel 575 $('.masonry-gallery .js-masonry-grid-works-filter').on('click', 'a', function (e) { 576 e.preventDefault(); 577 578 var filterValue = $(this).attr('data-filter'); 579 $('.masonry-gallery .js-masonry-grid-works-filter .list-masonry-grid-works-filter__item a').each(function (index) { 580 $(this).removeClass('btn-danger list-masonry-grid-works-filter__link_active'); 581 $(this).addClass('btn-primary'); 582 }); 583 584 $(this).removeClass('btn-primary'); 585 $(this).addClass('btn-danger list-masonry-grid-works-filter__link_active'); 586 587 masonryGrid.isotope({ 588 filter: filterValue 589 }); 590 }); 591 592 // lightbox gallery 593 $('.js-popup-gallery').magnificPopup({ 594 delegate: 'a', 595 type: 'image', 596 tLoading: 'Loading image #%curr%...', 597 mainClass: 'mfp-img-mobile', 598 gallery: { 599 enabled: true, 600 navigateByImgClick: true, 601 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 602 }, 603 image: { 604 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' 605 } 606 }); 607 }); 608 /* ###################### Masonry Gallery with Magnific Popup ###################### */ 609 610 /* ###################### Tooltip ##############
610######## */ 611 $document.ready(function () { 612 $('[data-toggle="tooltip"]').tooltip() 613 }); 614 /* ###################### Tooltip ###################### */ 615 616 /* ###################### Project Gallery ###################### */ 617 function loadPortfolioGallerySettings() { 618 619 return false; 620 621 if ($window.width() > 991) { 622 var projectGalleryHeight = $('.portfolio-inner-page .project-gallery').height(); 623 var projectGalleryWidth = $('.portfolio-inner-page .project-gallery').width(); 624 var projectInfoHeight = $('.portfolio-inner-page .project-info').height(); 625 $('.portfolio-inner-page .project-info').css({'max-width': projectGalleryWidth + 'px'}); 626 $('.portfolio-inner-page .js-in-viewport').css({'margin-top': projectInfoHeight + 'px'}); 627 } else { 628 if ($('.portfolio-inner-page .project-gallery').length > 0) { 629 $('.portfolio-inner-page .project-gallery').each(function () { 630 var el = $(this); 631 el.slick({ 632 centerMode: true, 633 centerPadding: '0px', 634 slidesToShow: 1, 635 arrows: true, 636 dots: false, 637 adaptiveHeight: true 638 }); 639 }); 640 } 641 } 642 } 643 644 $document.ready(function () { 645 loadPortfolioGallerySettings(); 646 }); 647 648 $document.on('resize', function () { 649 loadPortfolioGallerySettings(); 650 }); 651 652 653 $window.on('load', function () { 654 /* ###################### Project Gallery ###################### */ 655 656 var pInfo = $('.project-info'); 657 658 pInfo.stickySidebar({ 659 containerSelector: '.project-holder', 660 innerWrapperSelector: '.project-info-content', 661 topSpacing: 115, 662 bottomSpacing: 115 663 }); 664 }) 665 666 /* ###################### Product Gallery ###################### */ 667 /*function loadProductGallerySettings() { 668 669 return false; 670 671 if ($window.width() > 991) { 672 var productGalleryHeight = $('.shop-inner-page .product-gallery').height(); 673 var productGalleryWidth = $('.shop-inner-page .product-gallery').width(); 674 var productInfoHeight = $('.shop-inner-page .product-info').height(); 675 $('.shop-inner-page .product-info').css({'max-width': productGalleryWidth + 'px'}); 676 $('.shop-inner-page .js-in-viewport').css({'margin-top': productInfoHeight + 'px'}); 677 } else { 678 if ($('.shop-inner-page .product-gallery').length > 0) { 679 $('.shop-inner-page .product-gallery').each(function () { 680 var el = $(this); 681 el.slick({ 682 centerMode: true, 683 centerPadding: '0px', 684 slidesToShow: 1, 685 arrows: true, 686 dots: false, 687 adaptiveHeight: true 688 }); 689 }); 690 } 691 } 692 } 693 694 $document.ready(function () { 695 loadProductGallerySettings(); 696 }); 697 698 $document.on('resize', function () { 699 loadProductGallerySettings(); 700 }); 701 702 $window.on('load', function () { 703 /!* ###################### Project Gallery ###################### *!/ 704 705 var pInfo = $('.product-info'); 706 707 pInfo.stickySidebar({ 708 containerSelector: '.product-holder', 709 innerWrapperSelector: '.product-info-content', 710 topSpacing: 115, 711 bottomSpacing: 115 712 }); 713 })*/ 714 715 $document.ready(function () { 716 /* ###################### Magnific Popup with Video ###################### */ 717 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 718 disableOn: 700, 719 type: 'iframe', 720 mainClass: 'mfp-fade', 721 removalDelay: 160, 722 preloader: false, 723 724 fixedContentPos: false 725 }); 726 }); 727 /* ###################### Magnific Popup with Video ###################### */ 728 729 /* ###################### Zoom Container Open Image ###################### */ 730 // $document.ready(function () { 731 // $('.zoomWindow').on('click', function () { 732 // var img = $(this).css('background-image'); 733 // console.log(img); 734 // }); 735 // }); 736 /* ###################### Zoom Container Open Image ###################### */ 737 738 /* ###################### Video Section ###################### */ 739 function setHeightOnVideos() { 740 var headerheight = $('.navigation-holder').height(); 741 var windowheight = $(window).height(); 742 $('.video-section').css('height', windowheight - headerheight + "px"); 743 $('.video-section .video').css('height', windowheight - headerheight + "px"); 744 $('.video-section .container-fluid').css('height', windowheight - headerheight + "px"); 745 $('#main').css('margin-top', headerheight + "px"); 746 } 747 748 $document.ready(function () { 749 setHeightOnVideos(); 750 }); 751 752 $window.on('resize', function () { 753 setHeightOnVideos(); 754 }); 755 /* ###################### Video Section ###################### */ 756 757 /* ###################### Quantity ###################### */ 758 759 $document.ready(function () { 760 $(".arrow.minus").on("click", function (m) { 761 var i = $(this).parent().parent().find('input[name="quantity"], input[name="qty"], .js-qty'); 762 if (i.val() <= 1) { 763 i.val("1").change(); 764 } else { 765 var l = i.val() - 1; 766 i.val(l).change(); 767 } 768 }); 769 $(".arrow.plus").on("click", function (m) { 770 var i = $(this).parent().parent().find('input[name="quantity"], input[name="qty"], .js-qty'); 771 if (i.val() <= 19) { 772 var l = +i.val() + +1; 773 i.val(l).change(); 774 } 775 }); 776 }); 777 /* ###################### Quantity ###################### */ 778})(); 779 780$(document).ready(function () { 781 $('#mw-template-active').removeClass('module'); 782
783 $('.navigation .menu .list.menu_1').collapseNav({ 784 responsive: 1, 785 mobile_break: 992, 786 li_class: 'has-sub-menu dropdown' 787 }); 788 789 $(document).on('click', '.toggle-active', function () { 790 $(this).toggleClass('active'); 791 }); 792 793 $(document).on('change', '.filter-option', function () { 794 let name = $(this).attr('name'); 795 let length = $(`.filter-option[name='${name}']:checked`).length; 796 if(length == 0){ 797 $(this).closest('.section--filter__attribute__category').find('h5').removeClass('checked'); 798 }else{ 799 $(this).closest('.section--filter__attribute__category').find('h5').addClass('checked'); 800 } 801 802 if($('.section--filter__attribute .filter-option:checked').length){ 803 $('.section--filter__attribute').addClass('checked'); 804 $('.section--filter__attribute').find('.clear-text').html('Clear All'); 805 }else{ 806 $('.section--filter__attribute').removeClass('checked'); 807 $('.section--filter__attribute').find('.clear-text').html('All'); 808 } 809 }); 810 811 $(document).click(function (e) { 812 if(!$(e.target).closest('.section--filter__attribute__category').length){ 813 $('.section--filter__attribute__category h5').removeClass('active'); 814 } 815 }); 816 817 $('.section--filter__attribute__category h5').click(function (e) { 818 if($(e.target).closest('.filter-clear-btn').length){ 819 $(this).removeClass('checked'); 820 $(this).closest('.section--filter__attribute__category').find('.filter-option').prop('checked', false); 821 setTimeout(function () { 822 $('.filter-option').first().change(); 823 },100); 824 }else{ 825 if($(this).hasClass('active')){ 826 $('.section--filter__attribute__category h5').removeClass('active'); 827 }else{ 828 $('.section--filter__attribute__category h5').removeClass('active'); 829 $(this).addClass('active'); 830 } 831 } 832 }); 833 834 $('.section--header .depth-0 > ul').wrap('<div class="menu-wrapper" />').wrap('<div class="container" />'); 835 $('.section--header .depth-1 > .has-children-link').click(function (e) { 836 e.preventDefault(); 837 $(this).toggleClass('active'); 838 }); 839 840 $('.list.accordion a.has-children-link').click(function (e) { 841 e.preventDefault(); 842 if($(this).hasClass('active')){ 843 $(this).next().collapse('hide'); 844 }else{ 845 $(this).closest('.accordion').find('a.has-children-link.active').click(); 846 $(this).next().collapse('toggle'); 847 } 848 $(this).toggleClass('active'); 849 $(this).next().collapse('toggle'); 850 }); 851 852 $('.list.accordion > li.active-parent > a.has-children-link').click(); 853 854 $('.toggle-header-search-btn').click(function () { 855 $('.section--header-search').toggleClass('active'); 856 if($('.section--header-search').hasClass('active')){ 857 $('#header-search-input').focus(); 858 } 859 }); 860 861 $('.section.section--header li.depth-2').mouseenter(function () { 862 let url = $(this).attr('img-src'); 863 if(url){ 864 $(this).closest('.container > ul').css('background-image', `url(${url})`); 865 }else{ 866 $(this).closest('.container > ul').removeAttr('style'); 867 } 868 }); 869 870 871 $('.collapse-attrs').on('click', function() { 872 var status = 'toggle'; 873 var data_toggle_collapse = $(this).data('collapse'); 874 if(data_toggle_collapse == 'expand') { 875 $(this).find('span').html('Collapse All'); 876 status = 'show'; 877 $(this).data('collapse', 'collapse'); 878 } else if(data_toggle_collapse == 'collapse') { 879 $(this).find('span').html('Expand All'); 880 status = 'hide'; 881 $(this).data('collapse', 'expand'); 882 } 883 $('.item-group-attrs').collapse(status); 884 }); 885 886 $('.mobile-menu-btn').click(function () { 887 if(!$(this).hasClass('populated')){ 888 $(this).addClass('populated'); 889 $('#header-menu-left > ul').append(` 890 <li class="d-block d-md-none depth-0 mobile-search-link"><a href="/search">Search on Sharp <i class="ml-2 fal fa-search"></i></a></li> 891 <li class="d-block d-md-none depth-0"> 892 <div class="header-mobile-button-container"> 893 ${$('.header-button-container .button').eq(0)[0].outerHTML} 894 ${$('.header-button-container .button').eq(1)[0].outerHTML} 895 </div> 896 </li>`); 897 } 898 899 }); 900 901 $('.news-order-form__select').change(function () { 902 $(this).closest('form').submit(); 903 }); 904 905 906/* if($('.sticky-side-menu-layout .menu--accordion').length){ 907 if(!$('.sticky-side-menu-layout .menu--accordion').closest('.accordions-menu-container').length){ 908 $('.sticky-side-menu-layout .menu--accordion').wrap('<div class="accordions-menu-container"></div>'); 909 $('.accordions-menu-container').append('<span class="action-btn">e</span>'); 910 } 911 var element = $('.accordions-menu-container'); 912 //element.css('top', element.offset().top + 'px'); 913 //element.css('left', element.offset().left + 'px'); 914 }*/ 915 // $(document).click(function (e) { 916 // let category = $(e.target).closest('.section--filter__attribute__category'); 917 // 918 // if(category.length){ 919 // category = category.first(); 920 // let rel = category.attr('rel'); 921 // $(`.section--filter__attribute__category:not([rel='${rel}']) h5`).removeClass('active'); 922 // console.log(category.attr('rel')); 923 // console.log('1'); 924 // }else{ 925 // console.log('2'); 926 // $('.section--filter__attribute__category h5').removeClass('active'); 927 // } 928 // }); 929 930})
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.