1/* Generated by tools/wp-migration/sync-wordpress.ts â do not edit manually */ 2/* https://www.peplink.com/wp-content/themes/Archive/scripts/index.js?ver=1.0.0 */ 3let $ = jQuery; 4 5const __peplink = { 6 IEPrefix: function () { 7 if (!!window.document.documentMode) { 8 $('body').addClass('ie11'); 9 } 10 }, 11 handleMenuSizing: function () {}, 12 gridDebug: function () { 13 displayGridDebugger(); 14 window.addEventListener('hashchange', function () { 15 displayGridDebugger(); 16 }); 17 18 function displayGridDebugger() { 19 if (window.location.hash == '#grid') { 20 this.document.getElementById('gridDebug').classList.add('display'); 21 } 22 } 23 }, 24 wrapHeadingFours: function () { 25 $('h4').each(function () { 26 $(this).html(`<span>${$(this).text()}</span>`); 27 }); 28 }, 29 addBoxShadowToJumplinks: function () { 30 if ($('.jumplink-wrapper.active').length == -1) { 31 return; 32 } 33 $(window).on('scroll', function () { 34 let boxShadowOpacity = 0.0004 * $(window).scrollTop(); 35 let textOpacity = 0.002 * $(window).scrollTop(); 36 $('.jumplink-wrapper.active').css( 37 'box-shadow', 38 '0 9px 10px -10px rgba(0, 0, 0,' + boxShadowOpacity + ')' 39 ); 40 $('.jumplink-wrapper.active li.page-title').css('opacity', textOpacity); 41 }); 42 }, 43 breadcrumbPositioning: function () { 44 if ($('.breadcrumb')) { 45 if ( 46 $('.article-body > .jumplink-wrapper + div.block-wrapper > .hero') 47 .length > 0 || 48 $( 49 '.article-body > .jumplink-wrapper + div.block-wrapper > .product-hero' 50 ).length > 0 51 ) { 52 $('.breadcrumb').removeClass('no-hero'); 53 } else { 54 $('.breadcrumb').addClass('no-hero'); 55 } 56 } 57 }, 58 positionThirdLevelMenuItems: function () { 59 function getSpacingClass(menuItems) { 60 $('body .article-body') 61 .children('.block-wrapper')[0] 62 .classList.forEach(function (className) { 63 if (!!className.includes('has-spacing')) { 64 $('body .article-body') 65 .children('.block-wrapper') 66 .removeClass(className); 67 menuItems.addClass(className); 68 } 69 }); 70 } 71 if ($('.third-level-menu-icons').length > 0 && __peplink.heroFirstChild()) { 72 let menuItems = $('.third-level-menu-icons').clone(); 73 $('.third-level-menu-icons').remove(); 74 getSpacingClass(menuItems); 75 $('body .article-body').children('.block-wrapper')[0].after(menuItems[0]); 76 } 77 }, 78 setMenuNoUrls: function () { 79 $('header#header .main-menu-nav-container > ul > li').each(function () { 80 if (!!!$(this).find(' > a').attr('href')) { 81 $(this) 82 .find(' > a') 83 .on('click', function (e) { 84 e.preventDefault(); 85 }); 86 } 87 }); 88 }, 89 heroFirstChild: function () { 90 let firstChild = $('body .article-body').children('.block-wrapper')[0]; 91 if ($(firstChild).find('.hero').length !== 0) { 92 return true; 93 } else { 94 return false; 95 } 96 }, 97 productHeroFirstChild: function () { 98 let firstChild = $('body .article-body').children('.block-wrapper')[0]; 99 if ($(firstChild).find('.product-hero').length !== 0) { 100 return true; 101 } else { 102 return false; 103 } 104 }, 105 checkIfProductHero: function () { 106 let firstChild = $('body .article-body').children('.block-wrapper')[0]; 107 if (__peplink.productHeroFirstChild() && $('.breadcrumb').length > 0) { 108 let dataBackground = $(firstChild) 109 .find('.product-hero') 110 .attr('data-background'); 111 $(firstChild).find('.product-hero').addClass('overlay-breadcrumb'); 112 $('.breadcrumb').addClass('product-hero'); 113 $('.breadcrumb').attr('data-background', dataBackground); 114 } 115 }, 116 createJumplinks: function () { 117 if ($('body .article-body').length < 0 || $('.has-jumplink').length <= 0) { 118 // newly added by chris 119 $('#jumplink-pre').remove(); 120 $('.jumplink-wrapper').remove(); 121 return; 122 } 123 let jumplinkBackground; 124 let firstChild = $('body .article-body').children('.block-wrapper')[0]; 125 if (!!!__peplink.productHeroFirstChild()) {
126 jumplinkBackground = '#fff'; 127 } else { 128 $('.breadcrumb').addClass('product-hero'); 129 $(firstChild).find('.product-hero').removeClass('overlay-breadcrumb'); 130 if ( 131 $(firstChild).children('.product-hero').hasClass('orientation-bottom') 132 ) { 133 $('#jumplink-pre').addClass('has-height'); 134 } 135 jumplinkBackground = $(firstChild) 136 .children('.product-hero') 137 .attr('data-background'); 138 } 139 $('.breadcrumb').addClass('jumplinks-active'); 140 $('body').addClass('jumplinks-active'); 141 $('#jumplink-pre').attr('data-background', jumplinkBackground); 142 $('.jumplink-wrapper').attr('data-background', jumplinkBackground); 143 $('.jumplink-wrapper').addClass('active'); 144 145 let specialChars = "._~:/?#[]@!$&'()*+,;="; 146 specialChars = specialChars.split(''); 147 148 $('.has-jumplink').each(function (index, item) { 149 let innerText = $(this)[0].innerText.trim(); 150 let match = specialChars.filter((char) => innerText.indexOf(char) > -1); 151 match.forEach(function (char) { 152 innerText = innerText.replace(char, ''); 153 }); 154 innerText = innerText.replace('nbsp', ''); 155 let id = innerText.split(' ').join('-').toLowerCase(); 156 $(this).attr('id', id); 157 let jumplink = 158 '<li><a class="jumplink" href="#' + 159 id + 160 '">' + 161 $(this).html() + 162 '</a></li'; 163 let jumplinkOption = 164 '<option value="#' + id + '">' + $(this).html() + '</option>'; 165 $('ul#jumplink-container').append(jumplink); 166 $('select#jumplink-container').append(jumplinkOption); 167 }); 168 }, 169 smoothScrollToJumplinks: function () { 170 $('select#jumplink-container').on('change', function () { 171 let item = $(this).val(); 172 let offsetHeight = 30; 173 checkForAccordionItem(item); 174 smoothScroll(item, offsetHeight); 175 }); 176 177 $('a.jumplink').click(function (e) { 178 e.preventDefault(); 179 let item = $(this).attr('href'); 180 let offsetHeight = 80; 181 checkForAccordionItem(item); 182 smoothScroll(item, offsetHeight); 183 }); 184 185 const checkForAccordionItem = function (item) { 186 if ($(item).parents('.accordion-list-item').length > 0) { 187 $(item) 188 .parents('.accordion-list-item') 189 .find('input[type="checkbox"]')[0].checked = true; 190 } 191 }; 192 193 const smoothScroll = function (item, offsetHeight) { 194 if ($(item)) { 195 window.location.hash = item; 196 let headerHeight = 197 $('header#header').height() + 198 $('.jumplink-wrapper.active').height() + 199 offsetHeight; 200 let pos = parseFloat($(item).offset().top) - headerHeight; 201 window.scrollTo(0, pos); 202 } 203 }; 204 }, 205 unslickGallerySlider: function () { 206 if (window.innerWidth < 767) { 207 $('figure.wp-block-gallery.masonry-slider').each(function () { 208 $(this).find('.blocks-gallery-grid').slick('unslick'); 209 }); 210 } 211 }, 212 gallerySlider: function () { 213 const masonryOptions = { 214 dots: true, 215 arrows: false, 216 slidesToShow: 1, 217 slidesToScroll: 1, 218 centerMode: true, 219 variableWidth: true, 220 mobileFirst: true, 221 responsive: [ 222 { 223 breakpoint: 767, 224 settings: 'unslick', 225 }, 226 ], 227 }; 228 const fullWidthOptions = { 229 dots: true, 230 arrows: false, 231 slidesToShow: 1, 232 slidesToScroll: 1, 233 centerMode: true, 234 variableWidth: true, 235 mobileFirst: true, 236 responsive: [ 237 { 238 breakpoint: 767, 239 settings: { 240 dots: false, 241 arrows: true, 242 variableWidth: true, 243 }, 244 }, 245 ], 246 }; 247 248 const homepageOptions = { 249 dots: true, 250 arrows: false, 251 slidesToShow: 1, 252 slidesToScroll: 1, 253 mobileFirst: true, 254 adaptiveHeight: true, 255 dots: true, 256 autoplay: true, 257 autoplaySpeed: 5000, 258 responsive: [ 259 { 260 breakpoint: 767, 261 settings: { 262 dots: true, 263 arrows: true, 264 }, 265 }, 266 ], 267 }; 268 269 $('figure.wp-block-gallery').each(function () { 270 const $parent = $(this); 271 const $grid = $parent.find('> .blocks-gallery-grid'); 272 const $figures = $parent.find('> figure').clone(); 273 let $img, src, $filler; 274 275 if ($grid.length === 0 && $figures.length > 0) { 276 $parent.addClass('has-spacing-large block-wrapper'); 277 $parent.empty(); 278 $parent.append( 279 `<div class="hero loader"> 280 <div class="background background-gradient-overlay background-gradient-overlay-left"> 281 <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#fff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"/></svg> 282 </div> 283 </div>` 284 ); 285 286 if ($parent.hasClass('home-page-slider')) { 287 $parent.removeClass('wp-block-gallery'); 288 289 $.each($figures, function () { 290 let contents, link, text; 291 $img = $(this).find('img'); 292 src = $img.attr('src'); 293 contents = $(this).find('figcaption').html(); 294 text = contents; 295 if (contents.match(/<a[^>]*>([^<]+)<\/a>/g)) { 296 link = contents.match(/<a[^>]*>([^<]+)<\/a>/g)[0]; 297 text = text.replaceAll(/<a[^>]*>([^<]+)<\/a>/g, ''); 298 } 299 $(this).addClass('hero'); 300 $filler = $( 301 `<div class="background background-gradient-overlay background-gradient-overlay-left" style="background-image: url(${src});"> 302 <div class="text-content"> 303 <h1 class="display-true suppress-false has-spacing-small">${text}</h1> 304 ${ 305 link 306 ? `<div class="wp-block-button is-style-button-outline-primary"> 307 <a class="wp-block-button__link" href="${$(link).attr( 308 'href' 309 )}" rel="read-more" target="_blank"> 310 <strong>${$(link).text()}</strong> 311 </a> 312 </div>` 313 : '' 314 } 315 </div> 316 </div>` 317 ); 318 $(this).empty(); 319 $(this).append($filler); 320 }); 321 } 322 323 $parent.empty().append('<ul></ul>'); 324 $figures.each(function () { 325 $parent.find('> ul').append($('<li></li>').append($(this))); 326 }); 327 328 $parent.addClass('ready').find('> ul').addClass('blocks-gallery-grid'); 329 330 if ($parent.hasClass('home-page-slider')) { 331 $parent.find('.blocks-gallery-grid').slick(homepageOptions); 332 } else if ($parent.hasClass('masonry-slider')) { 333 $parent.removeClass('has-nested-images'); 334 $parent.find('> ul').find('li').addClass('blocks-gallery-item'); 335 $parent.find('.blocks-gallery-grid').slick(masonryOptions); 336 } else { 337 $parent.find('.blocks-gallery-grid').slick(fullWidthOptions); 338 } 339 } 340 }); 341 }, 342 tabbedContent: function () { 343 $('.tabbed-content').each(function () { 344 const el = $(this); 345 const navOptions = { 346 dots: true, 347 arrows: true, 348 slidesToShow: 1, 349 slidesToScroll: 1, 350 centerMode: true, 351 variableWidth: true, 352 mobileFirst: true, 353 asNavFor: el.find('.content-container'), 354 responsive: [ 355 { 356 breakpoint: 767, 357 settings: { 358 asNavFor: el.find('.content-container'), 359 slidesToShow: 4, 360 slidesToScroll: 1, 361 centerMode: true, 362 variableWidth: false, 363 }, 364 }, 365 ], 366 }; 367 const contentOptions = { 368 dots: false,
369 arrows: false, 370 slidesToShow: 1, 371 slidesToScroll: 1, 372 centerMode: true, 373 variableWidth: true, 374 mobileFirst: true, 375 asNavFor: el.find('.tab-nav'), 376 responsive: [ 377 { 378 breakpoint: 767, 379 settings: { 380 asNavFor: el.find('.tab-nav'), 381 }, 382 }, 383 ], 384 }; 385 386 el.find('.content-container').slick(contentOptions); 387 el.find('.tab-nav').slick(navOptions); 388 389 el.find('.tab-nav .slick-slide').click(function () { 390 const index = $(this).attr('data-slick-index'); 391 el.find('.content-container').slick('slickGoTo', index); 392 scrollNavIntoView(); 393 }); 394 395 el.find('button.slick-arrow').on('click', function () { 396 scrollNavIntoView(); 397 }); 398 399 el.find('.content-container').on('swipe', function () { 400 scrollNavIntoView(); 401 }); 402 403 el.find('ul.slick-dots li').on('click', function () { 404 scrollNavIntoView(); 405 }); 406 407 function scrollNavIntoView() { 408 if ( 409 el.find('.tab-nav .slick-track').children().length > 4 && 410 $(window).innerWidth() > 768 411 ) { 412 el.find('.tab-nav .slick-slide.slick-current')[0].scrollIntoView({ 413 behavior: 'smooth', 414 block: 'nearest', 415 inline: 'start', 416 }); 417 } 418 } 419 }); 420 }, 421 displayListingFilters: function () { 422 $('.listing-container').each(function () { 423 const el = $(this); 424 displaySelectedGroup(el.find('#filter-select').val()); 425 el.find('#filter-select').on('change', function () { 426 el.find('.filter-group').removeClass('selected'); 427 displaySelectedGroup($(this).val()); 428 }); 429 function displaySelectedGroup(dataID) { 430 el.find('.filter-group#' + dataID).addClass('selected'); 431 } 432 }); 433 }, 434 435 toggleMobileNavOpen: function () { 436 const elems = [ 437 'nav-wrapper', 438 'mobile-open-menu-icon', 439 'mobile-close-menu-icon', 440 'mobile-main-menu', 441 ].map((className) => $(`.${className}`)); 442 443 const titleElems = [ 444 'Products', 445 'Solutions', 446 'Technology', 447 'Support', 448 'Buy', 449 'Company', 450 ]; 451 452 $('.mobile-open-menu-icon').click(function () { 453 if ($('.nav-wrapper')[0].classList.value === 'nav-wrapper active') { 454 $('.nav-wrapper').removeClass('active'); 455 } 456 elems.forEach((elem) => elem.toggleClass('active')); 457 $('.mobile-main-menu-title').addClass('active'); 458 $('.blur').addClass('active'); 459 $('.mobile-main-menu-search').removeClass('active'); 460 }); 461 462 $('.mobile-close-menu-icon').click(function () { 463 elems.forEach((elem) => elem.removeClass('active')); 464 $('.mobile-site-logo-a').addClass('active'); 465 $('.mobile-open-menu-icon').addClass('active'); 466 $('.mobile-main-menu-title').removeClass('active'); 467 $('.mobile-menu-back').removeClass('active'); 468 $('.mobile-submenu').removeClass('active'); 469 $('.blur').removeClass('active'); 470 $('.mobile-main-menu-search').removeClass('active'); 471
472 titleElems.forEach((elem) => 473 $('.mobile-submenu-' + elem).removeClass('active') 474 ); 475 }); 476 $('.blur.active').click(function () { 477 elems.forEach((elem) => elem.removeClass('active')); 478 $('.mobile-site-logo-a').addClass('active'); 479 $('.mobile-open-menu-icon').addClass('active'); 480 $('.mobile-main-menu-title').removeClass('active'); 481 $('.mobile-menu-back').removeClass('active'); 482 $('.mobile-submenu').removeClass('active'); 483 $('.blur').removeClass('active'); 484 titleElems.forEach((elem) => 485 $('.mobile-submenu-' + elem).removeClass('active') 486 ); 487 $('.mobile-main-menu-search').removeClass('active'); 488 }); 489 // same page click # product (act reload) 490 let restoreHoverTimeout; 491 $('.sub-title-a-link').click(function () { 492 clearTimeout(restoreHoverTimeout); 493 restoreHoverTimeout = setTimeout(function () { 494 $('header#header .main-menu').removeClass( 495 'second-level-icon-menu-open' 496 ); 497 $('.menu-blur-layer').removeClass('active'); 498 $('.menu-item').removeClass('hovered-menu-item'); 499 $('.blur').removeClass('active'); 500 $('*').css('pointer-events', 'none'); 501 setTimeout(function () { 502 $('*').css('pointer-events', ''); 503 clearTimeout(restoreHoverTimeout); 504 }, 300); 505 }, 300); 506 507 setTimeout(function () { 508 clearTimeout(restoreHoverTimeout); 509 }, 600); 510 }); 511 512 // hover menu-item 513 $('.menu-item').hover(function () { 514 $('.blur').addClass('active'); 515 }); 516 }, 517 518 toggleMobileSubmenu: function () { 519 const elems = [ 520 'Products', 521 'Solutions', 522 'Technology', 523 'Support', 524 'Buy', 525 'Company', 526 ]; 527 elems.forEach(function (elem) { 528 $('.mobile-menu-' + elem).click(function () { 529 $('.mobile-menu-back').addClass('active'); 530 $('.mobile-submenu').addClass('active'); 531 $('.mobile-submenu-' + elem).addClass('active'); 532 $('.mobile-site-logo-a').removeClass('active'); 533 $('.mobile-main-menu-title').removeClass('active'); 534 $('.mobile-main-menu-search').removeClass('active'); 535 }); 536 }); 537 538 $('.mobile-menu-back').click(function () { 539 $('.mobile-main-menu-title').addClass('active'); 540 $('.mobile-site-logo-a').addClass('active'); 541 $('.mobile-submenu').removeClass('active'); 542 $('.mobile-menu-back').removeClass('active'); 543 $('.mobile-submenu-content').removeClass('active'); 544 $('.mobile-main-menu-search').removeClass('active'); 545 elems.forEach((elem) => 546 $('.mobile-submenu-' + elem).removeClass('active') 547 ); 548 }); 549 }, 550 551 toggleMobileSearch: function () { 552 $('.mobile-nav-search').click(function () { 553 $('.nav-wrapper').addClass('active'); 554 $('.blur').addClass('active'); 555 $('.mobile-main-menu-title').addClass('active'); 556 $('.mobile-close-menu-icon').addClass('active'); 557 $('.mobile-site-logo-a').addClass('active'); 558 $('.mobile-open-menu-icon').removeClass('active'); 559 $('.mobile-main-menu').removeClass('active'); 560 $('.mobile-menu-back').removeClass('active'); 561 $('.mobile-submenu-content').removeClass('active'); 562 $('.mobile-main-menu-search').addClass('active'); 563 }); 564 }, 565 566 blurLayer: function () { 567 $('.main-menu-inner-wrapper').hover( 568 function () { 569 $('.blur').addClass('active'); 570 }, 571 function () { 572 $('.blur').removeClass('active'); 573 } 574 ); 575 }, 576 setDesktopHeaderPositionAsFixed: function () { 577 $(window).on('scroll', function () { 578 if ($(window).scrollTop() > 0) { 579 $('.main-menu').addClass('fixed-on-desktop'); 580 $('body').addClass('header-fixed-on-desktop'); 581 } else { 582 $('.main-menu').removeClass('fixed-on-desktop'); 583 $('body').removeClass('header-fixed-on-desktop'); 584 } 585 }); 586 }, 587 headerSearch: function () { 588 $('#desktop-search #site_search').change(function () { 589 let searchVal = $('#desktop-search #site_search').val(); 590 if (searchVal.length > 0) { 591 $('#desktop-search #site_search').addClass('active'); 592 } else { 593 $('#desktop-search #site_search').removeClass('active'); 594 } 595 }); 596 $('#desktop-search input.submit').click(function (e) { 597 let searchVal = $('#desktop-search #site_search').val(); 598 if (searchVal.length == 0) { 599 e.preventDefault(); 600 $('#desktop-search #site_search').focus(); 601 } 602 }); 603 }, 604 tablepressInit: function () { 605 $('table.tablepress').dataTable({ 606 fixedHeader: true, 607 order: [], 608 }); 609 setTimeout(function () { 610 $('.dataTables_wrapper').each(function (index) { 611 $(this).on('page.dt', function () { 612 $('html, body').animate( 613 { 614 scrollTop: $(this).position().top - 200, 615 }, 616 100 617 ); 618 }); 619 }); 620 }, 200); 621 }, 622 handleDesktopMenuOverflow: function () { 623 $('.main-menu-nav-container > ul > li').hover(function () { 624 var ul = $(this).find('ul'); 625 var children = ul.children('li'); 626 children.css('transform', 'translateX(0px)'); 627 ul.attr('data-offset', 0); 628 // console.log(ul.children()); 629 // var items = children.length; 630 // var listitemwidth = 120; 631 // var totalwidth = items * listitemwidth; 632 // console.log(totalwidth, ul.width(), items); 633 // if (totalwidth - 200 > ul.width()) { 634 // ul.addClass("showArrows"); 635 // console.log('should show arrows') 636 // } else { 637 // ul.removeClass("showArrows"); 638 // console.log('should remove arrows') 639 // } 640 }); 641 $( 642 'header#header .main-menu .main-menu-nav-container > ul > li.menu-item-has-children > ul .icon-list-arrow' 643 ).click(function () { 644 var parent = $(this).parent(); 645 var children = parent.children('li'); 646 if (!parent.hasClass('showArrows')) { 647 return false;
648 } 649 650 var totalwidth = children.length * 120 - 200; 651 var extremeLimit = Math.floor((totalwidth - parent.width()) / 120); 652 var translateX = 0; 653 654 var currentOffset = parseInt(parent.attr('data-offset')); 655 var newOffset = currentOffset; 656 657 if ($(this).hasClass('icon-list-arrow-next')) { 658 newOffset++; 659 if (newOffset > extremeLimit) { 660 newOffset = extremeLimit; 661 } 662 translateX = newOffset * -120; 663 } else { 664 newOffset--; 665 if (newOffset < 0) { 666 newOffset = 0; 667 } 668 translateX = newOffset * -120; 669 } 670 671 children.css('transform', 'translateX(' + translateX + 'px)'); 672 parent.attr('data-offset', newOffset); 673 }); 674 }, 675 selectedMenuItem: function () { 676 var timeout; 677 $('header#header .main-menu-nav-container > ul > li').hover( 678 function () { 679 var $this = $(this); 680 $('header#header .main-menu').addClass('second-level-icon-menu-open'); 681 $('.menu-blur-layer').addClass('active'); 682 timeout = setTimeout(function () { 683 $this.addClass('hovered-menu-item'); 684 }, 300); 685 }, 686 function () { 687 $('header#header .main-menu').removeClass( 688 'second-level-icon-menu-open' 689 ); 690 $('.menu-blur-layer').removeClass('active'); 691 clearTimeout(timeout); 692 $(this).removeClass('hovered-menu-item'); 693 } 694 ); 695 }, 696 openSearch: function () { 697 $('.desktop-search').click(function () { 698 const el = $(this); 699 $('header#header .main-menu').addClass('second-level-icon-menu-open'); 700 $('.search-dropdown').addClass('active'); 701 $('.menu-blur-layer').addClass('active'); 702 }); 703 704 $('header#header').on('mouseleave', function () { 705 $('.search-dropdown').removeClass('active'); 706 $('header#header .main-menu').removeClass('second-level-icon-menu-open'); 707 $('.menu-blur-layer').removeClass('active'); 708 }); 709 710 $('.menu-item').hover(function () { 711 $('.search-dropdown').removeClass('active'); 712 }); 713 }, 714 searchInput: function () { 715 $('#desktop-search-icon').click(function () { 716 setTimeout(function () { 717 $('#site_search').focus(); 718 }, 100); 719 }); 720 }, 721 footerDropdown: function () { 722 const targets = [ 723 'Products', 724 'Services', 725 'Solutions', 726 'Technology', 727 'Support', 728 'Buy', 729 'Company', 730 'Resources', 731 ]; 732 targets.forEach(function (target) { 733 $('.menu-toggle-' + target).click(function () { 734 $('.footer-' + target).toggleClass('active'); 735 $('.footer-vector-up-' + target).toggleClass('active'); 736 $('.footer-vector-down-' + target).toggleClass('active'); 737 }); 738 }); 739 }, 740 scrollUpBtn: function () { 741 $(window).on('scroll', function () { 742 let scrollPosition = $(this).scrollTop(); 743 if (scrollPosition >= 1000) { 744 $('#scroll-btn').addClass('scroll-active'); 745 } else { 746 $('#scroll-btn').removeClass('scroll-active'); 747 } 748 }); 749 $('#scroll-btn').on('click', function () { 750 $('html, body').animate({ scrollTop: 0 }, 'slow'); 751 }); 752 }, 753 754 init: function () { 755 __peplink.IEPrefix(); 756 __peplink.gridDebug(); 757 // __peplink.setMenuNoUrls(); 758 __peplink.breadcrumbPositioning(); 759 __peplink.wrapHeadingFours(); 760 __peplink.checkIfProductHero(); 761 __peplink.createJumplinks(); 762 __peplink.smoothScrollToJumplinks(); 763 __peplink.gallerySlider(); 764 __peplink.tabbedContent(); 765 __peplink.displayListingFilters(); 766 __peplink.addBoxShadowToJumplinks(); 767 // __peplink.toggleMobileNavOpen(); 768 // __peplink.toggleMobileSubmenu(); 769 // __peplink.toggleMobileSearch(); 770 // __peplink.setDesktopHeaderPositionAsFixed(); 771 // __peplink.headerSearch(); 772 // __peplink.tablepressInit(); 773 // __peplink.positionThirdLevelMenuItems(); 774 // __peplink.handleDesktopMenuOverflow(); 775 // __peplink.selectedMenuItem(); 776 // __peplink.blurLayer(); 777 // __peplink.openSearch(); 778 // __peplink.searchInput(); 779 // __peplink.footerDropdown(); 780 __peplink.scrollUpBtn(); 781 }, 782}; 783 784jQuery(function () { 785 __peplink.init(); 786});
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.