1jQuery(document).ready(function ($) { 2 3 if ($('section').hasClass('portfolio-slider')) { 4 $('.portfolio-items').slick({ 5 slidesToShow: 2.25, 6 slidesToScroll: 1, 7 arrows: true, 8 // autoplay: true, 9 autoplaySpeed: 2500, 10 infinite: false, 11 touchThreshold: 20, 12 responsive: [{ 13 breakpoint: 980, 14 settings: { 15 slidesToShow: 1, 16 slidesToScroll: 1, 17 touchThreshold: 30, 18 mobileFirst: true, 19 } 20 }] 21 22 // infinite: false, 23 // slidesToShow: 2, 24 // slidesToScroll: 1, 25 // touchThreshold: 20, 26 // responsive: [ 27 // { 28 // breakpoint: 1280, 29 // settings: { 30 // slideToShow: 2, 31 // slidesToScroll: 1 32 // } 33 // }, 34 // { 35 // breakpoint: 980, 36 // settings: { 37 // slideToShow: 2, 38 // slidesToScroll: 0.5 39 // } 40 // }, 41 // { 42 // breakpoint: 768, 43 // settings: { 44 // // slideToShow: 1, 45 // slidesToScroll: 0.4, 46 // centerMode: false, 47 // // variableWidth: true, 48 // touchThreshold: 20 49 // } 50 // }, 51 // { 52 // breakpoint: 550, 53 // settings: { 54 // slideToShow: 1, 55 // slidesToScroll: .51, 56 // touchThreshold: 30, 57 // mobileFirst: true 58 // } 59 // } 60 // ] 61 }); 62 } 63 64 65 if ($('body').hasClass('escape-room-design-build')) { 66 $('span > .gfield_required').html('*'); 67 68 gallerySliderInit(); 69 70 } 71 72 73 74 function gallerySliderInit() { 75 let portfolioItemLinks = $('.portfolio-items .slide-more-img'); 76 77 for (var i = 0; i <= portfolioItemLinks.length - 1; i++) { 78 79 $(portfolioItemLinks[i]).click(function (e) { 80 let imgID = $(this).attr('data-img'); 81 82 openGalleryModal(imgID); 83 }); 84 } 85 86 87 let gal_wrapper = $('.gallery-popup-wrapper'); 88 $('body').prepend(gal_wrapper); 89 90 91 $('.gallery-popup-wrapper .close-modal').click(function (e) { 92 closeGalleryModal(); 93 }); 94 95 $('.gallery-popup-wrapper .next').click(function (e) { 96 97 if ($(this).hasClass('active')) { 98 let imgList = $('.gallery-popup-wrapper .row.active img').length - 1; 99 let current = $('.gallery-popup-wrapper .row.active img.active').attr('image-id'); 100 current = Number(current); 101 102 103 if (current == imgList) { 104 $('.gallery-popup-wrapper .next').addClass('in-active'); 105 $('.gallery-popup-wrapper .next').removeClass('active'); 106 107 return 1; 108 } 109 110 if ((current + 1) >= 1) { 111 $('.gallery-popup-wrapper .prev').removeClass('in-active'); 112 $('.gallery-popup-wrapper .prev').addClass('active'); 113 } 114 115 if (imgList > 0) { 116 117 if (imgList == current) { 118 current = 0; 119 } else { 120 current++; 121 } 122 123 124 let activeImg = $('.gallery-popup-wrapper .row.active img.active'); 125 let imgs = $('.gallery-popup-wrapper .row.active img'); 126 127 $(activeImg).toggleClass('active'); 128 $(imgs[current]).toggleClass('active'); 129 } 130 } 131 132 }); 133 134 $('.gallery-popup-wrapper .prev').click(function (e) { 135 136 if ($(this).hasClass('active')) { 137 let imgList = $('.gallery-popup-wrapper .row.active img').length - 1; 138 let current = $('.gallery-popup-wrapper .row.active img.active').attr('image-id'); 139 current = Number(current); 140 141 if ((current - 1) == 0) { 142 143 let activeImg = $('.gallery-popup-wrapper .row.active img.active'); 144 let imgs = $('.gallery-popup-wrapper .row.active img'); 145 146 $(activeImg).toggleClass('active'); 147 $(imgs[0]).toggleClass('active'); 148 149 $('.gallery-popup-wrapper .prev').toggleClass('in-active'); 150 $('.gallery-popup-wrapper .prev').toggleClass('active'); 151 152 return 1; 153 } 154 155 if ((current - 1) != imgList) { 156 $('.gallery-popup-wrapper .next').removeClass('in-active'); 157 $('.gallery-popup-wrapper .next').addClass('active'); 158 } 159 160 161 if (imgList > 0) { 162 if (current == 0) { 163 current = imgList; 164 } else { 165 current = current - 1; 166 } 167 168 169 let activeImg = $('.gallery-popup-wrapper .row.active img.active'); 170 let imgs = $('.gallery-popup-wrapper .row.active img'); 171 172 $(activeImg).toggleClass('active'); 173 $(imgs[current]).toggleClass('active'); 174 } 175 } 176 177 178 }); 179 180 181 } 182 183 function openGalleryModal(id) { 184 185 id = Number(id); 186 187 console.log(id); 188 189 let galleryWrapper = $('.gallery-popup-wrapper'); 190 let galleryRow = $('.gallery-popup-wrapper .row'); 191 192 $(galleryRow[id]).toggleClass('active'); 193 $(galleryWrapper).toggleClass('active'); 194 195 196 let current = $(galleryRow[id]); 197 198 let imgs = $(current).find('img'); 199 $(imgs[0]).toggleClass('active'); 200 201 202 let imgList = $('.gallery-popup-wrapper .row.active img').length - 1; 203 204 if (imgList == 0) { 205 $('.gallery-popup-wrapper .prev').toggleClass('in-active'); 206 $('.gallery-popup-wrapper .next').toggleClass('in-active'); 207 $('.gallery-popup-wrapper .prev').removeClass('active'); 208 $('.gallery-popup-wrapper .next').removaClass('active'); 209 } 210 211 212 } 213 214 function closeGalleryModal() { 215 let galleryWrapper = $('.gallery-popup-wrapper'); 216 let galleryRow = $('.gallery-popup-wrapper .active'); 217 218 $(galleryRow).toggleClass('active'); 219 $(galleryWrapper).toggleClass('active'); 220 221 $('img.active').toggleClass('active'); 222 $('.gallery-popup-wrapper .next').addClass('active'); 223 $('.gallery-popup-wrapper .in-active').removeClass('in-active'); 224 $('.gallery-popup-wrapper .prev').removeClass('active') 225 $('.gallery-popup-wrapper .prev').addClass('in-active'); 226 } 227 228 229 // Add Font Awesome Icon 230 $.each({ 231 '.detail-accessibility .data': 'wheelchair', 232 }, prependIcon); 233 234 function prependIcon(thing, icon) { 235 $(thing).prepend('<i class="fas fa-' + icon + '"></i>'); 236 } 237 238 $('#gform_submit_button_6').on('click', function() { 239 setTimeout(function() { 240 $('html, body').animate({ 241 scrollTop: $("#sign-up-form").offset().top - 100 242 }, 1000); 243 }, 3000); 244 }); 245 246});
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.