1$(function(){ 2 3 4 var agendaModule, locationModule,modules = [], agendaSlider, locationSlider, agendaSliderOptions, locationSliderOptions; 5 6 agendaSlider = $("#agenda-slider").length; 7 locationSlider = $("#location-slider").length; 8 9 agendaSliderOptions = { 10 loop:false, 11 speed: 1500, 12 slidesPerView:3, 13 pagination: '.swiper-pagination.agenda-pagination', 14 paginationType: 'bullets', 15 paginationClickable: true, 16 breakpoints:{ 17 991:{ 18 slidesPerView:2, 19 }, 20 767:{ 21 slidesPerView:1, 22 autoplay: 7000, 23 }, 24 } 25 }; 26 locationSliderOptions = { 27 loop:false, 28 speed: 1500, 29 slidesPerView:4, 30 slidesPerGroup: 1, 31 centeredSlides:false, 32 pagination: '.swiper-pagination.location-pagination', 33 paginationType: 'bullets', 34 paginationClickable: true, 35 spaceBetween: 0, 36 breakpoints:{ 37 991:{ 38 slidesPerView: 2, 39 centeredSlides:true, 40 autoplay: 7000, 41 spaceBetween: 20 42 }, 43 640:{ 44 slidesPerView: 'auto', 45 centeredSlides:true, 46 autoplay: 7000, 47 spaceBetween: 10, 48 }, 49 } 50 }; 51 52 agendaModule = {'slider' : '#agenda-slider', 'options': agendaSliderOptions}; 53 locationModule = {'slider' : '#location-slider', 'options': locationSliderOptions}; 54 55 if(locationSlider){ 56 modules.push(locationModule); 57 } 58 59 var agendaSlider = new Swiper(agendaModule.slider, agendaModule.options); 60 61 $('.navbar-toggler').on('click', function () { 62 $('.animated-icon2').toggleClass('open'); 63 }); 64 65 66 /* Swiper 67 **************************************************************/ 68 var swiper; 69 var init = false; 70 71 72 /* Which media query 73 **************************************************************/ 74 function swiperMode(module) { 75 var mobile = window.matchMedia('(min-width: 0px) and (max-width: 991px)'); 76 var desktop = window.matchMedia('(min-width: 992px)'); 77 78 // Enable (for mobile) 79 if(mobile.matches) { 80 if (!init) { 81 init = true; 82 swiper = new Swiper(module.slider, module.options); 83 } 84 } 85 86 // Disable (for desktop) 87 else if(desktop.matches) { 88 //swiper.destroy(); 89 init = false; 90 } 91 } 92 93 if(modules.length >= 1) 94 { 95 window.addEventListener('load', function () { 96 for(var i = 0; i<modules.length; i++){ 97 swiperMode(modules[i]); 98 } 99 }); 100 101 window.addEventListener('resize', function () { 102 for(var i = 0; i<modules.length; i++){ 103 swiperMode(modules[i], modules[i].options); 104 } 105 }); 106 } 107});
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.