1/* 2WORK MILL media js 3*/ 4 5(function($) { 6 7 //js-menu-toggle Sub Menu Toggle 8 $( '.js-menu-toggle > div > ul > .menu-item-has-children > a' ). on( 'click', function (){ 9 $( this ).toggleClass( 'active' ); 10 $( this ).next( '.sub-menu' ).slideToggle( 400 ); 11 return false; 12 } ); 13 14 //Modal Scroll Controls 15 const body = $( 'body' ); 16 const ua = window.navigator.userAgent.toLowerCase(); 17 const isiOS = ua.indexOf( 'iphone' ) > -1 || ua.indexOf( 'ipad' ) > -1 || ( ua.indexOf( 'macintosh' ) > -1 && 'ontouchend' in document ); 18 let scrollPosition; 19 //ios modal scroll control 20 function iosModalScroll( state ) { 21 if ( state === 'false' ) { 22 if ( isiOS ) { 23 scrollPosition = window.pageYOffset; 24 body.css( 'position', 'fixed' ); 25 body.css( 'top', '-' + scrollPosition + 'px' ); 26 } 27 body.addClass( 'off' ); 28 } else { 29 if ( isiOS ) { 30 body.css( 'position', '' ); 31 body.css( 'top', '' ); 32 $( window ).scrollTop( scrollPosition ); 33 } 34 body.removeClass( 'off' ); 35 } 36 } 37 38 //Modal Menu Common Toggle Script 39 $( '.js-modal-toggle' ).on( 'click', function () { 40 let modalTarget = $(this).attr('aria-controls'), 41 modalExpand = $(this).attr('aria-expanded'); 42 iosModalScroll( modalExpand ); 43 $('#' + modalTarget).attr('aria-hidden', modalExpand); 44 } ); 45 46 47 //Swiper 48 var swiper = new Swiper('.wm-swiper .swiper-container', { 49 cssMode: true, 50 navigation: { 51 nextEl: '.swiper-button-next', 52 prevEl: '.swiper-button-prev', 53 }, 54 pagination: { 55 el: '.wm-swiper .swiper-pagination', 56 type: 'bullets', 57 clickable: true, 58 }, 59 mousewheel: true, 60 keyboard: true, 61 }); 62 63 //pickupSwiper 64 var swiper = new Swiper('.wm-pickup-swiper', { 65 centeredSlides: true, 66 loop: true, 67 speed: 500, 68 slidesPerView: 2.8, 69 spaceBetween: 10, 70 autoplay: { 71 delay: 8000, 72 }, 73 breakpoints: { 74 320: { 75 slidesPerView: 1.2, 76 spaceBetween: 0, 77 }, 78 768: { 79 slidesPerView: 2, 80 spaceBetween: 0, 81 }, 82 950: { 83 lidesPerView: 2.8, 84 }, 85 1500: { 86 slidesPerView: 3.5, 87 }, 88 }, 89 pagination: { 90 el: '.wm-pickup-swiper .swiper-pagination', 91 type: 'bullets', 92 clickable: true, 93 }, 94 keyboard: true, 95 }); 96 97})(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.