1jQuery(document).ready(function () { 2 // Add state change to header on scroll ****************************** // 3 4 if (jQuery("#masthead").length) { 5 var header = jQuery("#masthead"); 6 jQuery(window).scroll(function () { 7 var scroll = jQuery(window).scrollTop(); 8 if (scroll >= 20) { 9 header.addClass("header-scroll"); 10 } else { 11 header.removeClass("header-scroll"); 12 } 13 }); 14 } 15 16 //Tabbed Content ****************************** // 17 18 if (jQuery(".tab-wrapper").length) { 19 var jQuerywrapper = jQuery(".tab-wrapper"), 20 jQueryallTabs = jQuerywrapper.find( 21 ".tab-content > div.tab-content__wrapper" 22 ), 23 jQuerytabMenu = jQuerywrapper.find(".tab-menu li"); 24 25 jQueryallTabs.not(":first-of-type").hide(); 26 jQuerytabMenu.filter(":first-of-type").addClass("active"); 27 jQuerytabMenu.filter(":first-of-type").find(":first").width("100%"); 28 29 jQuerytabMenu.each(function (i) { 30 jQuery(this).attr("data-tab", "tab" + i); 31 }); 32 33 jQueryallTabs.each(function (i) { 34 jQuery(this).attr("data-tab", "tab" + i); 35 }); 36 37 jQuerytabMenu.on("click", function () { 38 var dataTab = jQuery(this).data("tab"), 39 jQuerygetWrapper = jQuery(this).closest(jQuerywrapper); 40 41 jQuerygetWrapper.find(jQuerytabMenu).removeClass("active"); 42 jQuery(this).addClass("active"); 43 44 jQuerygetWrapper.find(jQueryallTabs).hide(); 45 jQuerygetWrapper 46 .find(jQueryallTabs) 47 .filter("[data-tab=" + dataTab + "]") 48 .show(); 49 }); 50 } 51 52 // Tabbed Content Mobile - Optional ****************************** // 53 54 if (jQuery(".tab-content-mobile").length) { 55 jQuery(".tab-mobile-single-wrap:first-of-type").addClass("active"); 56 jQuery( 57 ".tab-mobile-single-wrap:first-of-type .tab-information" 58 ).slideDown(); 59 60 jQuery(".tab-topic").on("click", function () { 61 if (jQuery(this).parent(".tab-mobile-single-wrap").hasClass("active")) { 62 jQuery(this).siblings(".tab-information").slideToggle(); 63 } else { 64 jQuery(".tab-mobile-single-wrap").removeClass("active"); 65 jQuery("tab-information").slideUp(); 66 jQuery(this).parent(".tab-mobile-single-wrap").addClass("active"); 67 jQuery(this).siblings(".tab-information").slideToggle(); 68 } 69 }); 70 } 71 72 // Product Tab Content ****************************** // 73 74 if (jQuery(".individual-lines-wrapper").length) { 75 jQuery(".line-tab:first-of-type").addClass("active"); // Add active class to the first tab 76 jQuery(".line-tab-info:first-of-type").addClass("active"); // Add active class to the first content 77 78 jQuery(".line-tab").on("click", function () { 79 if (jQuery(this).hasClass("active")) { 80 // do nothing 81 } else { 82 var dataTab = jQuery(this).data("menu-tab"); // Get the data-tab value 83 console.log(dataTab); 84 85 jQuery(this).siblings(".line-tab").removeClass("active"); // Remove active class from siblings 86 87 jQuery(this) // Add active class to the clicked tab 88 .closest(".line-tab-menu-wrapper") 89 .siblings(".line-tab-info-wrapper") 90 .children(".line-tab-info") 91 .removeClass("active"); 92 93 jQuery(this).closest(".line-tab-info").removeClass("active"); // Remove active class from all content 94 jQuery(this).addClass("active"); // Add active class to the clicked tab 95 jQuery("." + dataTab).addClass("active"); // Show the corresponding content based on data-tab value 96 } 97 }); 98 } 99 100 // Product Sliders with Slick Loop ****************************** // 101 // Loops through 10 numbers, giving each slider a unique class and also the next/prev buttons a unique class 102 103 [1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10].forEach(function (i) { 104 jQuery(`.prod-gallery-wrapper-${i}`).slick({ 105 infinite: true, 106 slidesToShow: 3, 107 slidesToScroll: 1, 108 nextArrow: jQuery(`.next-btn-${i}`), 109 prevArrow: jQuery(`.prev-btn-${i}`), 110 responsive: [ 111 { 112 breakpoint: 768, 113 settings: { 114 slidesToShow: 2, 115 infinite: true, 116 }, 117 }, 118 { 119 breakpoint: 600, 120 settings: { 121 slidesToShow: 2, 122 }, 123 }, 124 { 125 breakpoint: 550, 126 settings: { 127 slidesToShow: 1, 128 slidesToScroll: 1, 129 }, 130 }, 131 ], 132 }); 133 }); 134 135 // Timeline Slider ****************************** // 136 137 if (jQuery(".timeline-slider").length) { 138 jQuery(".timeline-slider").slick({ 139 infinite: false, 140 slidesToShow: 3, 141 slidesToScroll: 1, 142 arrows: true, 143 nextArrow: jQuery(".next-btn"), 144 prevArrow: jQuery(".prev-btn"), 145 responsive: [ 146 { 147 breakpoint: 475, 148 settings: { 149 slidesToShow: 1, 150 }, 151 }, 152 { 153 breakpoint: 768, 154 settings: { 155 slidesToShow: 2, 156 }, 157 }, 158 ], 159 }); 160 } 161 162 // Reviews Tiny Slider ****************************** // 163 164 if (jQuery(".reviews__slider").length) { 165 if (document.getElementsByClassName(".reviews__slider")) { 166 let reviews_slider = tns({ 167 container: ".reviews__slider", 168 loop: true, 169 mouseDrag: true, 170 items: 3, 171 slideBy: 1, 172 edgePadding: 0, 173 gutter: 30, 174 autoplay: true, 175 autoplayButtonOutput: false, 176 nav: false, 177 controls: false, 178 speed: 600,
179 responsive: { 180 375: { 181 items: 1, 182 edgePadding: 32, 183 }, 184 768: { 185 items: 2, 186 }, 187 992: { 188 items: 3, 189 edgePadding: 0, 190 }, 191 }, 192 }); 193 } 194 } 195 196 // Trust Factor Tiny Slider For Hero Component ****************************** // 197 198 if (jQuery(".trust-factors__slider").length) { 199 if (document.getElementsByClassName(".trust-factors__slider")) { 200 let tf_slider = tns({ 201 container: ".trust-factors__slider", 202 autoWidth: true, 203 items: 5, 204 slideBy: 1, 205 gutter: 30, 206 autoplay: true, 207 autoplayButtonOutput: false, 208 mouseDrag: true, 209 nav: false, 210 controls: false, 211 speed: 600, 212 responsive: { 213 375: { 214 items: 1, 215 }, 216 768: { 217 items: 3, 218 }, 219 992: { 220 items: 5, 221 }, 222 }, 223 }); 224 } 225 } 226 227 // Trust Factor Tiny Slider For PB Layout ****************************** // 228 229 if (jQuery(".section-trust-factors__slider").length) { 230 if (document.getElementsByClassName(".section-trust-factors__slider")) { 231 let tf_section_slider = tns({ 232 container: ".section-trust-factors__slider", 233 //autoWidth: true, 234 items: 4, 235 slideBy: 1, 236 gutter: 30, 237 autoplay: true, 238 autoplayButtonOutput: false, 239 mouseDrag: true, 240 nav: false, 241 controls: false, 242 speed: 600, 243 responsive: { 244 375: { 245 items: 2, 246 }, 247 768: { 248 items: 4, 249 }, 250 992: { 251 items: 4, 252 }, 253 }, 254 }); 255 } 256 } 257 258 if (jQuery(".faqs__wrapper").length) { 259 jQuery(".faq-single:first-of-type").addClass("active"); 260 jQuery(".faq-single:first-of-type .faq-content").slideDown(); 261 262 jQuery(".faq-single").click(function () { 263 if (jQuery(this).hasClass("active")) { 264 // jQuery(this).removeClass("active"); 265 // jQuery(".faq-content").slideUp(); 266 } else { 267 jQuery(".faq-single").removeClass("active"); 268 jQuery(this).addClass("active"); 269 jQuery(".faq-content").slideUp(); 270 jQuery(this).find(".faq-content").slideDown(); 271 } 272 }); 273 } 274 275 // Magnifi Pop-up ****************************** // 276 277 if (jQuery(".yt-video").length) { 278 jQuery(document).ready(function (jQuery) { 279 jQuery(".yt-video").magnificPopup({ 280 type: "iframe", 281 }); 282 }); 283 } 284 if (jQuery(".image-popup").length) { 285 jQuery(document).ready(function (jQuery) { 286 jQuery(".image-popup").magnificPopup({ 287 type: "image", 288 }); 289 }); 290 } 291 if (jQuery(".content-popup").length) { 292 jQuery(document).ready(function (jQuery) { 293 jQuery(".content-popup").magnificPopup({ 294 type: "inline", 295 preloader: false, 296 focus: "#name", 297 }); 298 }); 299 } 300 if (jQuery(".popup").length) { 301 jQuery(document).ready(function (jQuery) { 302 jQuery(".popup").magnificPopup({ 303 type: "iframe", 304 }); 305 }); 306 } 307 308 // Reloads Jquery script after FacetWP is triggered ****************************** // 309 document.addEventListener("facetwp-loaded", function () { 310 if (jQuery(".image-popup").length) { 311 jQuery(document).ready(function (jQuery) { 312 jQuery(".image-popup").magnificPopup({ 313 type: "image", 314 }); 315 }); 316 } 317 }); 318 319 // Single post scroll progress ****************************** // 320 321 if (jQuery(".post-progress").length) { 322 window.onscroll = function () { 323 blogProgress(); 324 }; 325 function blogProgress() { 326 var winScroll = 327 document.body.scrollTop || document.documentElement.scrollTop; 328 var height = 329 document.documentElement.scrollHeight - 330 document.documentElement.clientHeight; 331 var scrolled = (winScroll / height) * 100; 332 document.getElementById("scroll-progress").style.width = scrolled + "%"; 333 } 334 } 335 336 // Removes Card Links on PPC Page ****************************** // 337 338 jQuery(".page-template-page-ppc .card--block-link").on("click", function (e) { 339 e.preventDefault(); 340 }); 341 jQuery(".page-template-page-ppc .ppc-no-link").on("click", function (e) { 342 e.preventDefault(); 343 }); 344 345 jQuery(".page-template-page-ppc .ppc-no-link").on("click", function (e) { 346 e.preventDefault(); 347 }); 348 349 // Removes Card Links on Product Pages ****************************** // 350 jQuery("a.link-no").on("click", function (e) { 351 e.preventDefault(); 352 }); 353 354 // Removes Card Links on Project Slider ****************************** // 355 jQuery(".proj-gal-single a ").on("click", function (e) { 356 e.preventDefault(); 357 }); 358 359 // Slick Slider ****************************** // 360 361 jQuery(".slick-center").slick({ 362 centerMode: true, 363 slidesToShow: 3, 364 arrows: true, 365 nextArrow: jQuery(".next-btn-proj"), 366 prevArrow: jQuery(".prev-btn-proj"), 367 responsive: [ 368 { 369 breakpoint: 1200, 370 settings: {
371 arrows: false, 372 centerMode: true, 373 slidesToShow: 1, 374 centerPadding: "200px", 375 }, 376 }, 377 { 378 breakpoint: 968, 379 settings: { 380 arrows: false, 381 centerMode: true, 382 slidesToShow: 1, 383 centerPadding: "60px", 384 }, 385 }, 386 { 387 breakpoint: 400, 388 settings: { 389 arrows: false, 390 centerMode: true, 391 slidesToShow: 1, 392 centerPadding: "20px", 393 }, 394 }, 395 ], 396 }); 397 398 jQuery(".slick-center-process").slick({ 399 centerMode: true, 400 slidesToShow: 3, 401 infinite: false, 402 dots: true, 403 responsive: [ 404 { 405 breakpoint: 968, 406 settings: { 407 arrows: false, 408 centerMode: true, 409 slidesToShow: 1, 410 }, 411 }, 412 { 413 breakpoint: 480, 414 settings: { 415 arrows: false, 416 centerMode: true, 417 slidesToShow: 1, 418 }, 419 }, 420 ], 421 }); 422 423 jQuery(".slick-process-vert").slick({ 424 //centerMode: true, 425 slidesToShow: 2, 426 infinite: false, 427 //dots: true, 428 vertical: true, 429 verticalSwiping: true, 430 responsive: [ 431 { 432 breakpoint: 968, 433 settings: { 434 arrows: false, 435 centerMode: true, 436 slidesToShow: 2, 437 }, 438 }, 439 { 440 breakpoint: 480, 441 settings: { 442 arrows: false, 443 centerMode: true, 444 slidesToShow: 2, 445 }, 446 }, 447 ], 448 }); 449 450 jQuery(".slick-trust").slick({ 451 infinite: true, 452 slidesToShow: 5, 453 slidesToScroll: 5, 454 autoplay: true, 455 autoplaySpeed: 5000, 456 457 responsive: [ 458 { 459 breakpoint: 1024, 460 settings: { 461 slidesToShow: 3, 462 slidesToScroll: 3, 463 infinite: true, 464 dots: true, 465 }, 466 }, 467 { 468 breakpoint: 600, 469 settings: { 470 slidesToShow: 2, 471 slidesToScroll: 2, 472 }, 473 }, 474 { 475 breakpoint: 480, 476 settings: { 477 slidesToShow: 1, 478 slidesToScroll: 1, 479 }, 480 }, 481 ], 482 }); 483 484 console.log("All Scrips Loaded"); 485}); // End Document.Ready
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.