1(function ($, Drupal) { 2 function applyWhenElementExists(selector, myFunction, intervalTime) { 3 var interval = setInterval(function () { 4 if (jQuery(selector).length > 0) { 5 myFunction(); 6 clearInterval(interval); 7 } 8 }, intervalTime); 9 } 10 var isLowEndDevice = window.navigator.hardwareConcurrency && window.navigator.hardwareConcurrency < 4; 11 12 if (isLowEndDevice) { 13 $('body').addClass('lowend-device'); 14 } 15 16 var lastScrollTop = 0; // Store the last scroll position 17 18 19 20 $(window).scroll(function () { 21 if ($(window).scrollTop() >= 50) { 22 $('body').addClass('header-fixed'); 23 $('header').addClass('is-fixed'); 24 //$('body').removeClass('scroll-up'); 25 26 } else { 27 $('body').removeClass('header-fixed'); 28 $('header').removeClass('is-fixed'); 29 //$('body').addClass('scroll-up'); 30 } 31 32 var currentScroll = $(this).scrollTop(); // Get current scroll position 33 if (currentScroll < lastScrollTop) { 34 // Scrolling up 35 $('body').addClass('scrolled-up'); // Add your desired class 36 } else { 37 // Scrolling down 38 $('body').removeClass('scrolled-up'); // Remove the class if scrolling down 39 } 40 lastScrollTop = currentScroll; // Update the last scroll position 41 42 applyWhenElementExists('.steps-content-wrapper ', function () { 43 $(".steps-content-wrapper .field--item").each(function () { 44 if ($(window).scrollTop() >= $(this).offset().top + $(this).outerHeight() - window.innerHeight) { 45 $(".steps-content-wrapper .field--item").removeClass('active'); 46 $(this).addClass("active"); 47 } 48 }) 49 }, 50); 50 51 52 }); 53 54 (function () { 55 'use strict'; 56 57 function videoCover() { 58 59 document.querySelectorAll('.new-front-banner-inner .front-desktop-video .bg-img').forEach(function (container) { 60 61 var iframe = container.querySelector('iframe'); 62 if (!iframe) return; 63 64 var w = container.clientWidth; 65 var h = container.clientHeight; 66 67 if (!w || !h) return; 68 69 var ratio = 16 / 9; 70 71 var videoWidth = w; 72 var videoHeight = w / ratio; 73 74 if (videoHeight < h) { 75 videoHeight = h; 76 videoWidth = h * ratio; 77 } 78 79 iframe.style.position = 'absolute'; 80 iframe.style.width = videoWidth + 'px'; 81 iframe.style.height = videoHeight + 'px'; 82 iframe.style.left = '50%'; 83 iframe.style.top = '50%'; 84 iframe.style.transform = 'translate(-50%, -50%)'; 85 iframe.style.maxWidth = 'none'; 86 iframe.style.maxHeight = 'none'; 87 iframe.style.border = '0'; 88 iframe.style.opacity = '1'; 89 }); 90 91 } 92 93 window.addEventListener('load', videoCover); 94 window.addEventListener('resize', videoCover); 95 window.addEventListener('orientationchange', videoCover); 96 97 if ('ResizeObserver' in window) { 98 document.querySelectorAll('.new-front-banner-inner .front-desktop-video').forEach(function (el) { 99 new ResizeObserver(videoCover).observe(el); 100 }); 101 } 102 103 })(); 104 105 (function () { 106 'use strict'; 107 108 function mobileVideoCover() { 109 110 document.querySelectorAll('.new-front-banner-inner .front-mobile-video .bg-img').forEach(function (container) { 111 112 var iframe = container.querySelector('iframe'); 113 if (!iframe) return; 114 115 var w = container.clientWidth; 116 var h = container.clientHeight; 117 118 if (!w || !h) return; 119 120 // Mobile Video Ratio (9:16) 121 var ratio = 9 / 16; 122 123 var videoWidth = w; 124 var videoHeight = w / ratio; 125 126 if (videoHeight < h) { 127 videoHeight = h; 128 videoWidth = h * ratio; 129 } 130 131 iframe.style.position = 'absolute'; 132 iframe.style.width = videoWidth + 'px'; 133 iframe.style.height = videoHeight + 'px'; 134 iframe.style.left = '50%'; 135 iframe.style.top = '50%'; 136 iframe.style.transform = 'translate(-50%, -50%)'; 137 iframe.style.maxWidth = 'none'; 138 iframe.style.maxHeight = 'none'; 139 iframe.style.border = '0'; 140 iframe.style.opacity = '1'; 141 }); 142 143 } 144 145 window.addEventListener('load', mobileVideoCover); 146 window.addEventListener('resize', mobileVideoCover); 147 window.addEventListener('orientationchange', mobileVideoCover); 148 149 if ('ResizeObserver' in window) { 150 document.querySelectorAll('.new-front-banner-inner .front-mobile-video').forEach(function (el) { 151 new ResizeObserver(mobileVideoCover).observe(el); 152 }); 153 } 154 155 })();
156 157 jQuery(window).on('load', function () { 158 $('body').addClass('pg-loaded'); 159 160 applyWhenElementExists('.webform-submission-prijs-logo-new-form', function () { 161 162 var userCookie = Cookies.get('prijval'); 163 if (userCookie) { 164 setTimeout(function () { 165 jQuery('html, body').animate({ 166 scrollTop: jQuery('.webform-submission-prijs-logo-new-form').offset().top - 320 167 }, 1000); 168 }, 100); 169 jQuery(".form-item-select-price .select-wrapper select").val(userCookie).change(); 170 } 171 }, 50); 172 173 }); 174 function isInViewport($element) { 175 var elementTop = $element.offset().top; 176 var elementBottom = elementTop + $element.outerHeight(); 177 var viewportTop = $(window).scrollTop(); 178 var viewportBottom = viewportTop + $(window).height(); 179 return elementBottom > viewportTop && elementTop < viewportBottom; 180 } 181 182 function checkVisibility() { 183 $('.new-front-diensten-inner').each(function () { 184 if (isInViewport($(this))) { 185 $(this).addClass('in-viewport'); 186 } else { 187 $(this).removeClass('in-viewport'); 188 } 189 }); 190 } 191 var scrolled = 0; 192 $(document).ready(function ($) { 193 194 applyWhenElementExists('.gridcaroswiper', function () { 195 var swiper = new Swiper(".gridcaroswiper", { 196 pagination: { 197 el: ".gridcaroswiper-pagination", 198 clickable: true 199 }, 200 // loop: true, 201 spaceBetween: 15, 202 slidesPerView: 1, 203 autoplay: { 204 delay: 3000, 205 disableOnInteraction: false, 206 }, 207 // navigation: { 208 // nextEl: ".gridcaroswiper-button-next", 209 // prevEl: ".gridcaroswiper-button-prev", 210 // }, 211 breakpoints: { 212 320: { 213 spaceBetween: 15, 214 slidesPerView: 1, 215 }, 216 576: { 217 spaceBetween: 15, 218 slidesPerView: 2, 219 }, 220 768: { 221 spaceBetween: 15, 222 slidesPerView: 2, 223 }, 224 992: { 225 spaceBetween: 15, 226 slidesPerView: 3, 227 }, 228 1200: { 229 spaceBetween: 15, 230 slidesPerView: 4, 231 }, 232 }, 233 }); 234 }, 50); 235 236 //console.log('ready'); 237 238 // $(window).on("scroll", function () { 239 // $(".slowparallex").each(function () { 240 // const $el = $(this); 241 // const scrollTop = $(window).scrollTop(); 242 // const windowHeight = $(window).height(); 243 // const offsetTop = $el.offset().top; 244 // const elHeight = $el.outerHeight(); 245 246 // if (scrollTop + windowHeight > offsetTop && scrollTop < offsetTop + elHeight) { 247 // const visiblePart = scrollTop + windowHeight - offsetTop; 248 249 // const yPos = visiblePart / 2; 250 251 // $el.css("background-position", "50% " + yPos + "px"); 252 // } 253 // }); 254 // }); 255 256 $(window).on("scroll", function () { 257 var sc = $(this).scrollTop(); 258 if ($('body').hasClass('page-node-type-service') || $('body').hasClass('node-459') || $('body').hasClass('node-398')) { 259 $(".slowparallex").css( 260 "background-position", 261 "50% calc(50% + " + (sc / 3) + "px)" 262 ); 263 } else { 264 $(".slowparallex").css( 265 "background-position", 266 "0% calc(0% + " + (sc / 3) + "px)" 267 ); 268 } 269 }); 270 271 272 273 274 applyWhenElementExists('.block-custom-service-detail-related-service-block', function () { 275 276 $('.scrl-dn').each(function () { 277 $(this).click(function () { 278 var attr = $(this).attr('data-area'); 279 //setTimeout(function () { 280 jQuery('html, body').animate({ 281 scrollTop: jQuery('.' + attr).offset().top - 100 282 }, 1000); 283 //}, 100); 284 285 }) 286 }) 287 288 // var userCookie = Cookies.get('prijval'); 289 // if (userCookie) { 290 // setTimeout(function () { 291 // jQuery('html, body').animate({ 292 // scrollTop: jQuery('.webform-submission-prijs-logo-new-form').offset().top - 320 293 // }, 1000); 294 // }, 100); 295 // jQuery(".form-item-select-price .select-wrapper select").val(userCookie).change(); 296 // } 297 }, 50); 298 299 applyWhenElementExists('.webform-submission-form', function () { 300 301 $('.webform-submission-form').find('.description').each(function () { 302 if ($(this).hasClass('text-muted')) { 303 $(this).removeClass('text-muted'); 304 } 305 }) 306 307 }, 50); 308 309 applyWhenElementExists('.scenerio-table-inner', function () { 310 $('.scenerio-table-inner').each(function(){ 311 var numss = $(this).find('th').length; 312 $(this).find('.custom-table').addClass('col-'+numss); 313 }) 314 315 }, 50); 316 317 applyWhenElementExists('.service-card-inner', function () { 318 319 $('.service-card-inner').each(function () { 320 var elm = $(this).find('.bg-desktop-img-prpnd'); 321 var to = $(this).find('.desktop-bgg'); 322 323 var elm2 = $(this).find('.bg-mobile-img-prpnd'); 324 var to2 = $(this).find('.mobile-bgg'); 325 326 to.prepend(elm.html()); // .appnd-elm ke andar ka content le jaake .appnd-to ke start mein daalega 327 to2.prepend(elm2.html()); // .appnd-elm ke andar ka content le jaake .appnd-to ke start mein daalega 328 elm.remove(); // .appnd-elm element ko DOM se hata dega 329 elm2.remove(); // .appnd-elm element ko DOM se hata dega 330 }); 331 332 333 334 }, 50); 335 336 applyWhenElementExists('.new-menu-diensten-inner iframe', function () { 337 $('.new-menu-diensten-inner iframe').each(function () { 338 //console.log($(this).attr('src')); 339 $(this).removeAttr('loading'); 340 }) 341 }, 50); 342 343 applyWhenElementExists('.toolbar-link__label', function () { 344 $('.toolbar-link__label').each(function () { 345 console.log($(this).text()); 346 if ($(this).text() == 'Custom') { 347 $(this).parent().addClass('admin-cstm-menu-lnk'); 348 } 349 }) 350 }, 50); 351 352 applyWhenElementExists('.for-desktop .zichtbaarheid-tabs-popup-wrapper', function () { 353 //$('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').hide(); 354 $('.for-desktop .zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-tabs-inner').hover(function () { 355 $('.for-desktop .zichtbaarheid-tabs-popup-wrapper').addClass('active-popup'); 356 //$('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeIn(); 357 }, function () { 358 $('.for-desktop .zichtbaarheid-tabs-popup-wrapper').removeClass('active-popup'); 359 //$('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeOut(); 360 }); 361 $('.for-desktop .zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-tabs-inner').click(function () { 362 363 // if($('.zichtbaarheid-tabs-popup-wrapper').hasClass('active-popup')){ 364 // $('.zichtbaarheid-tabs-popup-wrapper').removeClass('active-popup'); 365 // $('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeOut(); 366 // }else{ 367 // $('.zichtbaarheid-tabs-popup-wrapper').addClass('active-popup'); 368 // $('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeIn(); 369 // } 370 $('.for-desktop .zichtbaarheid-tabs-popup-wrapper').toggleClass('active-popup') 371 }) 372 }, 50); 373 374 applyWhenElementExists('.for-desktop .fundering-tabs-popup-wrapper', function () { 375 //$('.fundering-tabs-popup-wrapper .fundering-popup').hide(); 376 $('.for-desktop .fundering-tabs-popup-wrapper .fundering-tabs-inner').hover(function () { 377 $('.fundering-tabs-popup-wrapper').addClass('active-popup'); 378 //$('.fundering-tabs-popup-wrapper .fundering-popup').fadeIn(); 379 }, function () { 380 $('.for-desktop .fundering-tabs-popup-wrapper').removeClass('active-popup'); 381 //$('.fundering-tabs-popup-wrapper .fundering-popup').fadeOut(); 382 }); 383 $('.for-desktop .fundering-tabs-popup-wrapper .fundering-tabs-inner').click(function () { 384 385 // if($('.fundering-tabs-popup-wrapper').hasClass('active-popup')){ 386 // $('.fundering-tabs-popup-wrapper').removeClass('active-popup'); 387 // $('.fundering-tabs-popup-wrapper .fundering-popup').fadeOut(); 388 // }else{ 389 // $('.fundering-tabs-popup-wrapper').addClass('active-popup'); 390 // $('.fundering-tabs-popup-wrapper .fundering-popup').fadeIn(); 391 // } 392 $('.for-desktop .fundering-tabs-popup-wrapper').toggleClass('active-popup') 393 }) 394 }, 50); 395 396 applyWhenElementExists('.for-desktop .ux-tabs-popup-wrapper', function () { 397 //$('.ux-tabs-popup-wrapper .ux-popup').hide(); 398 $('.for-desktop .ux-tabs-popup-wrapper .ux-tabs-inner').hover(function () { 399 $('.ux-tabs-popup-wrapper').addClass('active-popup'); 400 //$('.ux-tabs-popup-wrapper .ux-popup').fadeIn(); 401 }, function () { 402 $('.for-desktop .ux-tabs-popup-wrapper').removeClass('active-popup'); 403 // $('.ux-tabs-popup-wrapper .ux-popup').fadeOut(); 404 }); 405 $('.for-desktop .ux-tabs-popup-wrapper .ux-tabs-inner').click(function () { 406 407 // if($('.ux-tabs-popup-wrapper').hasClass('active-popup')){ 408 // $('.ux-tabs-popup-wrapper').removeClass('active-popup'); 409 // $('.ux-tabs-popup-wrapper .ux-popup').fadeOut(); 410 // }else{ 411 // $('.ux-tabs-popup-wrapper').addClass('active-popup'); 412 // $('.ux-tabs-popup-wrapper .ux-popup').fadeIn(); 413 // } 414 $('.for-desktop .ux-tabs-popup-wrapper').toggleClass('active-popup') 415 }) 416 }, 50); 417 418 applyWhenElementExists('.for-desktop .marketing-tabs-popup-wrapper', function () { 419 //$('.marketing-tabs-popup-wrapper .marketing-popup').hide(); 420 $('.for-desktop .marketing-tabs-popup-wrapper .marketing-tabs-inner').hover(function () { 421 $('.for-desktop .marketing-tabs-popup-wrapper').addClass('active-popup'); 422 //$('.marketing-tabs-popup-wrapper .marketing-popup').fadeIn(); 423 }, function () { 424 $('.for-desktop .marketing-tabs-popup-wrapper').removeClass('active-popup'); 425 //$('.marketing-tabs-popup-wrapper .marketing-popup').fadeOut(); 426 }); 427 $('.for-desktop .marketing-tabs-popup-wrapper .marketing-tabs-inner').click(function () { 428 429 // if($('.marketing-tabs-popup-wrapper').hasClass('active-popup')){ 430 // $('.marketing-tabs-popup-wrapper').removeClass('active-popup'); 431 // $('.marketing-tabs-popup-wrapper .marketing-popup').fadeOut(); 432 // }else{ 433 // $('.marketing-tabs-popup-wrapper').addClass('active-popup'); 434 // $('.marketing-tabs-popup-wrapper .marketing-popup').fadeIn(); 435 // } 436 $('.for-desktop .marketing-tabs-popup-wrapper').toggleClass('active-popup') 437 }) 438 }, 50); 439 440 applyWhenElementExists('.for-desktop .interactive-tabs-popup-wrapper', function () { 441 //$('.interactive-tabs-popup-wrapper .interactive-popup').hide(); 442 $('.for-desktop .interactive-tabs-popup-wrapper .interactive-tabs-inner').hover(function () { 443 $('.for-desktop .interactive-tabs-popup-wrapper').addClass('active-popup'); 444 //$('.interactive-tabs-popup-wrapper .interactive-popup').fadeIn(); 445 }, function () { 446 $('.for-desktop .interactive-tabs-popup-wrapper').removeClass('active-popup'); 447 //$('.interactive-tabs-popup-wrapper .interactive-popup').fadeOut(); 448 }); 449 $('.for-desktop .interactive-tabs-popup-wrapper .interactive-tabs-inner').click(function () { 450 451 // if($('.interactive-tabs-popup-wrapper').hasClass('active-popup')){ 452 // $('.interactive-tabs-popup-wrapper').removeClass('active-popup'); 453 // $('.interactive-tabs-popup-wrapper .interactive-popup').fadeOut(); 454 // }else{ 455 // $('.interactive-tabs-popup-wrapper').addClass('active-popup'); 456 // $('.interactive-tabs-popup-wrapper .interactive-popup').fadeIn(); 457 // } 458 $('.for-desktop .interactive-tabs-popup-wrapper').toggleClass('active-popup') 459 }) 460 }, 50); 461 462 463 //for mobile cruical 464 465 // applyWhenElementExists('.for-mobile .zichtbaarheid-tabs-popup-wrapper', function () { 466 // $('.for-mobile .zichtbaarheid-tabs-popup-wrapper').click(function(){ 467 468 // // if($('.zichtbaarheid-tabs-popup-wrapper').hasClass('active-popup')){ 469 // // $('.zichtbaarheid-tabs-popup-wrapper').removeClass('active-popup'); 470 // // $('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeOut(); 471 // // }else{ 472 // // $('.zichtbaarheid-tabs-popup-wrapper').addClass('active-popup'); 473 // // $('.zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').fadeIn(); 474 // // } 475 // //$('.for-mobile .main-pop').removeClass('active-popup'); 476 // $('.for-mobile .zichtbaarheid-tabs-popup-wrapper').toggleClass('active-popup'); 477 // if ($('.for-mobile .zichtbaarheid-tabs-popup-wrapper').hasClass('active-popup')) { 478 479 // $('.for-mobile .zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').show(); // Show the div 480 // } else { 481 // $('.for-mobile .zichtbaarheid-tabs-popup-wrapper .zichtbaarheid-popup').hide(); // Hide the div 482 // } 483 // }) 484 // }, 50); 485 486 // applyWhenElementExists('.for-mobile .fundering-tabs-popup-wrapper', function () { 487 // $('.for-mobile .fundering-tabs-popup-wrapper').click(function(){ 488 489 // // if($('.fundering-tabs-popup-wrapper').hasClass('active-popup')){ 490 // // $('.fundering-tabs-popup-wrapper').removeClass('active-popup'); 491 // // $('.fundering-tabs-popup-wrapper .fundering-popup').fadeOut(); 492 // // }else{ 493 // // $('.fundering-tabs-popup-wrapper').addClass('active-popup'); 494 // // $('.fundering-tabs-popup-wrapper .fundering-popup').fadeIn(); 495 // // } 496 // //$('.for-mobile .main-pop').removeClass('active-popup'); 497 // $('.for-mobile .fundering-tabs-popup-wrapper').toggleClass('active-popup'); 498 // if ($('.for-mobile .fundering-tabs-popup-wrapper').hasClass('active-popup')) { 499 500 // $('.for-mobile .fundering-tabs-popup-wrapper .fundering-popup').show(); // Show the div 501 // } else { 502 // $('.for-mobile .fundering-tabs-popup-wrapper .fundering-popup').hide(); // Hide the div 503 // } 504 // }) 505 // }, 50); 506 507 // applyWhenElementExists('.for-mobile .ux-tabs-popup-wrapper', function () { 508 // $('.for-mobile .ux-tabs-popup-wrapper').click(function(){ 509 510 // // if($('.ux-tabs-popup-wrapper').hasClass('active-popup')){ 511 // // $('.ux-tabs-popup-wrapper').removeClass('active-popup'); 512 // // $('.ux-tabs-popup-wrapper .ux-popup').fadeOut(); 513 // // }else{ 514 // // $('.ux-tabs-popup-wrapper').addClass('active-popup'); 515 // // $('.ux-tabs-popup-wrapper .ux-popup').fadeIn(); 516 // // } 517 // //$('.for-mobile .main-pop').removeClass('active-popup'); 518 // $('.for-mobile .ux-tabs-popup-wrapper').toggleClass('active-popup'); 519 // if ($('.for-mobile .ux-tabs-popup-wrapper').hasClass('active-popup')) { 520 521 // $('.for-mobile .ux-tabs-popup-wrapper .ux-popup').show(); // Show the div 522 // } else { 523 // $('.for-mobile .ux-tabs-popup-wrapper .ux-popup').hide(); // Hide the div 524 // } 525 // }) 526 // }, 50); 527 528 // applyWhenElementExists('.for-mobile .marketing-tabs-popup-wrapper', function () { 529 // $('.for-mobile .marketing-tabs-popup-wrapper').click(function(){ 530 // //$('.for-mobile .main-pop').removeClass('active-popup'); 531 // // if($('.marketing-tabs-po
531pup-wrapper').hasClass('active-popup')){ 532 // // $('.marketing-tabs-popup-wrapper').removeClass('active-popup'); 533 // // $('.marketing-tabs-popup-wrapper .marketing-popup').fadeOut(); 534 // // }else{ 535 // // $('.marketing-tabs-popup-wrapper').addClass('active-popup'); 536 // // $('.marketing-tabs-popup-wrapper .marketing-popup').fadeIn(); 537 // // } 538 // $('.for-mobile .marketing-tabs-popup-wrapper').toggleClass('active-popup'); 539 // if ($('.for-mobile .marketing-tabs-popup-wrapper').hasClass('active-popup')) { 540 541 // $('.for-mobile .marketing-tabs-popup-wrapper .marketing-popup').show(); // Show the div 542 // } else { 543 // $('.for-mobile .marketing-tabs-popup-wrapper .marketing-popup').hide(); // Hide the div 544 // } 545 // }) 546 // }, 50); 547 548 // applyWhenElementExists('.for-mobile .interactive-tabs-popup-wrapper', function () { 549 // $('.for-mobile .interactive-tabs-popup-wrapper').click(function(){ 550 // //$('.for-mobile .main-pop').removeClass('active-popup'); 551 // // if($('.interactive-tabs-popup-wrapper').hasClass('active-popup')){ 552 // // $('.interactive-tabs-popup-wrapper').removeClass('active-popup'); 553 // // $('.interactive-tabs-popup-wrapper .interactive-popup').fadeOut(); 554 // // }else{ 555 // // $('.interactive-tabs-popup-wrapper').addClass('active-popup'); 556 // // $('.interactive-tabs-popup-wrapper .interactive-popup').fadeIn(); 557 // // } 558 // $('.for-mobile .interactive-tabs-popup-wrapper').toggleClass('active-popup'); 559 // if ($('.for-mobile .interactive-tabs-popup-wrapper').hasClass('active-popup')) { 560 // $('.for-mobile .interactive-tabs-popup-wrapper .interactive-popup').show(); // Show the div 561 // } else { 562 // $('.for-mobile .interactive-tabs-popup-wrapper .interactive-popup').hide(); // Hide the div 563 // } 564 // }) 565 // }, 50); 566 567 568 applyWhenElementExists('.for-mobile .main-pop', function () { 569 $('.for-mobile .main-pop').each(function () { 570 $(this).click(function () { 571 $('.for-mobile .main-pop').not(this).removeClass('active-popup'); 572 $(this).toggleClass('active-popup'); 573 if ($(this).hasClass('active-popup')) { 574 $(this).find('.main-pop-up').show(); // Show the div 575 } else { 576 $(this).find('.main-pop-up').hide(); // Hide the div 577 } 578 579 }) 580 }) 581 }, 50); 582 583 applyWhenElementExists('.for-mobile .paragraph--type--tabs-popup-text', function () { 584 $('.for-mobile .paragraph--type--tabs-popup-text').each(function () { 585 $(this).click(function () { 586 $('.for-mobile .paragraph--type--tabs-popup-text').not(this).removeClass('active-popup'); 587 $(this).toggleClass('active-popup'); 588 if ($(this).hasClass('active-popup')) { 589 $('.for-mobile .paragraph--type--tabs-popup-text .tab-popup').hide(); 590 $(this).find('.tab-popup').show(); // Show the div 591 } else { 592 $(this).find('.tab-popup').hide(); // Hide the div 593 } 594 595 }) 596 }) 597 }, 50); 598 599 600 601 602 603 604 605 setInterval(function () { 606 $('.sf-hidden').removeClass('sf-hidden'); 607 }, 10); // Check every 100 milliseconds 608 609 applyWhenElementExists('.clone-click', function () { 610 $('.clone-click').each(function () { 611 $(this).find('.sf-sub-indicator').addClass('clone-click-sf-sub-indicator'); 612 $($(this).find('.sf-sub-indicator')[0].outerHTML).insertAfter(this); 613 $(this).find('.sf-sub-indicator').hide(); 614 }) 615 616 $('.clone-click-sf-sub-indicator').each(function () { 617 $(this).click(function () { 618 $(this).parent().toggleClass('activate-menu'); 619 }) 620 }) 621 622 }, 50); 623 624 applyWhenElementExists('.content-wrapper-404 .region-content', function () { 625 626 $('.content-wrapper-404 .region-content .block-custom-client-marquee-block').remove(); 627 }, 50); 628 applyWhenElementExists('.search-result-page-wrapper .region-content', function () { 629 630 $('.search-result-page-wrapper .region-content .block-custom-client-marquee-block').remove(); 631 }, 50); 632 633 applyWhenElementExists('.tabs', function () { 634 //console.log($('.clone-click .sf-sub-indicator')[0].outerHTML); 635 //$(".clone-click").after(); 636 $('nav.tabs').addClass('tabs-spacing-top'); 637 638 639 }, 50); 640 641 642 643 AOS.init({ 644 once: true, // whether animation should happen only once - while 645 duration: 1000, // values from 0 to 3000, with step 50ms 646 offset: 100, 647 });
648 applyWhenElementExists('.breadcrumb li', function () { 649 $(".breadcrumb li").each(function () { 650 if ($(this).text().trim() == '') { 651 $(this).hide(); 652 } 653 }) 654 }, 50); 655 656 657 658 applyWhenElementExists('.cookiesjsr-service-group', function () { 659 $('.cookiesjsr-service-group').each(function () { 660 $(this).click(function () { 661 //console.log('click'); 662 $(this).find('.cookiesjsr-service--action label').addClass('active'); 663 $(this).find('.cookiesjsr-service--action label').attr('title', 'Allowed'); 664 }) 665 }) 666 667 }, 50); 668 669 // applyWhenElementExists('.jarallax', function () { 670 671 // jarallax(document.querySelectorAll('.jarallax')); 672 // jarallax(document.querySelectorAll('.jarallax-keep-img'), { 673 // keepImg: true, 674 // }); 675 676 677 // }, 50); 678 679 680 // applyWhenElementExists('.scroll-on-wheel', function () { 681 // document.querySelectorAll('.scrl-img-wrapper').forEach((wrapper) => { 682 // const scrollContainer = wrapper.querySelector('.field--item .scroll-on-wheel'); 683 684 // // Scroll Down button 685 // wrapper.querySelector('.scrl-down').addEventListener('click', () => { 686 // scrollContainer.scrollBy({ 687 // top: 300, // Scroll down by 200px 688 // behavior: 'smooth' // Smooth scrolling 689 // }); 690 // }); 691 692 // // Scroll Up button 693 // wrapper.querySelector('.scrl-up').addEventListener('click', () => { 694 // scrollContainer.scrollBy({ 695 // top: -300, // Scroll up by 200px 696 // behavior: 'smooth' // Smooth scrolling 697 // }); 698 // }); 699 // }); 700 // }, 50); 701 702 applyWhenElementExists('.img-type-scrl-img', function () { 703 704 $(".img-type-scrl-img").each(function () { 705 var curr = $(this); 706 curr.find('.scrl-down').click(function () { 707 curr.find('.scroll-on-wheel').animate({ 708 scrollTop: curr.find('.scroll-on-wheel').scrollTop() + 300 709 }, 500); 710 }) 711 712 curr.find('.scrl-up').click(function () { 713 curr.find('.scroll-on-wheel').animate({ 714 scrollTop: curr.find('.scroll-on-wheel').scrollTop() - 300 715 }, 500); 716 }) 717 }) 718 719 // $('.scrl-down').on('click', function() { 720 // $('.scroll-on-wheel').animate({ 721 // scrollTop: $('.scroll-on-wheel').scrollTop() + 300 722 // }, 500); // 500ms for smooth scroll 723 // }); 724 725 // $('.scrl-up').on('click', function() { 726 // $('.scroll-on-wheel').animate({ 727 // scrollTop: $('.scroll-on-wheel').scrollTop() - 300 728 // }, 500); // 500ms for smooth scroll 729 // }); 730 731 }, 50); 732 733 734 735 applyWhenElementExists('.table-sroll-btns', function () { 736 const tableInner = $('.table-inner'); 737 const leftBtn = $('.mobile-scroll-left'); 738 const rightBtn = $('.mobile-scroll-right'); 739 function updateButtonVisibility() { 740 // Check if the table is scrolled all the way to the left 741 if (tableInner.scrollLeft() <= 0) { 742 leftBtn.hide(); // Hide left button 743 } else { 744 leftBtn.show(); // Show left button 745 } 746 747 // Check if the table is scrolled all the way to the right 748 if (tableInner.scrollLeft() + tableInner.outerWidth() >= tableInner[0].scrollWidth) { 749 rightBtn.hide(); // Hide right button 750 } else { 751 rightBtn.show(); // Show right button 752 } 753 } 754 updateButtonVisibility(); 755 756 $('.mobile-scroll-right').click(function (event) { 757 event.preventDefault(); 758 tableInner.animate({ 759 scrollLeft: "+=223px" 760 }, "slow", function () { 761 updateButtonVisibility(); // Update button visibility after scrolling 762 }); 763 }); 764 765 // Scroll Left button 766 $('.mobile-scroll-left').click(function (event) { 767 event.preventDefault(); 768 tableInner.animate({ 769 scrollLeft: "-=223px" 770 }, "slow", function () { 771 updateButtonVisibility(); // Update button visibility after scrolling 772 }); 773 }); 774 775 // Listen to the scroll event for the table (in case user scrolls manually) 776 tableInner.on('scroll', function () { 777 updateButtonVisibility(); // Update button visibility when table is manually scrolled 778 }); 779 780 781 }, 50); 782 applyWhenElementExists('.steps-arrow-down', function () { 783 $('.steps-arrow-down').on('click', function () { 784 var currentIndex = $('.steps-arrow-down').index(this); // Get the index of the clicked span 785 var nextSpan = $('.steps-arrow-down').eq(currentIndex + 1); // Find the next span 786 787 if (nextSpan.length) { // If the next span exists 788 $('html, body').animate({ 789 scrollTop: nextSpan.offset().top - 100 // Scroll to the next span's position 790 }, 500); // Duration of the scroll (500ms) 791 } 792 }); 793 }, 50); 794 795 applyWhenElementExists('.titlesteps-for-mobile-wrapper', function () { 796 797 $('.field--name-field-add-content .field--item').each(function () { 798 799 $(this).find('.titlesteps-for-mobile-outer').prepend($(this).find('.titlesteps-for-mobile-wrapper').html()); 800 $(this).find('.titlesteps-for-mobile-wrapper').hide(); 801 }) 802 803 }, 50); 804 805 806 807 808 applyWhenElementExists('.cookiesjsr-service-group', function () { 809 $('.cookiesjsr-service-group').each(function () { 810 $(this).click(function () { 811 //console.log('click'); 812 $(this).find('.cookiesjsr-service--action label').addClass('active'); 813 $(this).find('.cookiesjsr-service--action label').attr('title', 'Allowed'); 814 }) 815 }) 816 817 }, 50); 818 819 // applyWhenElementExists('.page-node-453', function () { 820 // $('.page-node-453').addClass('not-header-fixed'); 821 // }, 50); 822 823 applyWhenElementExists('.page-node-453', function () { 824 825 var $container = $('.child-service-inner'); // Select the parent container 826 var $children = $container.children('.child'); // Select all children with the class "child" 827 828 // Loop through the children in groups of 4 and wrap them in a wrapper div 829 var totalChildren = $children.length; 830 831 // Wrap every 4 child items into a wrapper 832 for (var i = 0; i < totalChildren; i += 4) { 833 $children.slice(i, i + 4).wrapAll('<div class="wrapper"></div>'); 834 } 835 }, 50); 836 837 838 applyWhenElementExists('.new-front-banner-wrapper .new-front-banner-inner .field--name-field-video-link', function () { 839 $('.new-front-banner-wrapper .new-front-banner-inner .field--name-field-video-link').each(function () { 840 var video_iframe_inner = $(this).innerHeight(); 841 var calculate_min = video_iframe_inner / 9; 842 var calculate_min_width = calculate_min * 16; 843 $(this).find('.vimeo-container').css('min-width', calculate_min_width); 844 }); 845 }, 50); 846 847 applyWhenElementExists('.new-front-banner-wrapper .new-front-banner-inner .field--name-field-video-link-2', function () { 848 $('.new-front-banner-wrapper .new-front-banner-inner .field--name-field-video-link-2').each(function () { 849 var video_iframe_inner = $(this).innerHeight(); 850 var calculate_min = video_iframe_inner / 9; 851 var calculate_min_width = calculate_min * 16; 852 $(this).find('.vimeo-container').css('min-width', calculate_min_width); 853 }); 854 }, 50); 855 856 applyWhenElementExists('.video-text-inner', function () { 857 $('.video-text-inner').each(function () { 858 var video_iframe_inner = $(this).innerHeight(); 859 var calculate_min = video_iframe_inner / 9; 860 var calculate_min_width = calculate_min * 20; 861 $(this).find('.desktop-video .vimeo-item').css('min-width', calculate_min_width); 862 }); 863 }, 50); 864 865 applyWhenElementExists('.video-text-inner', function () { 866 $('.video-text-inner').each(function () { 867 var video_iframe_inner = $(this).innerHeight(); 868 var calculate_min = video_iframe_inner / 9; 869 var calculate_min_width = calculate_min * 16; 870 $(this).find('.mobile-video .vimeo-item').css('min-width', calculate_min_width); 871 }); 872 }, 50); 873 874 // applyWhenElementExists('.service-card-inner .field--name-field-landscape-video-link .horizontal-video', function () { 875 // $('.service-card-inner .field--name-field-landscape-video-link .horizontal-video .vimeo-container').each(function(){ 876 // var video_iframe_inner = $(this).innerHeight(); 877 // //console.log(video_iframe_inner); 878 // var calculate_min = video_iframe_inner / 9; 879 // var calculate_min_width = calculate_min * 16; 880 // $(this).find('iframe').css('min-width',calculate_min_width); 881 // }); 882 // }, 50); 883 884 // applyWhenElementExists('.service-card-inner .vertical-video', function () { 885 // $('.service-card-inner .vertical-video .vimeo-container').each(function(){ 886 // var video_iframe_inner = $(this).innerHeight(); 887 // //console.log(video_iframe_inner); 888 // var calculate_min = video_iframe_inner / 16; 889 // var calculate_min_width = calculate_min * 9; 890 // $(this).find('iframe').css('min-width',calculate_min_width); 891 // }); 892 // }, 50); 893 894 applyWhenElementExists('.single-card-wrapper', function () { 895 $('.single-card-wrapper').each(function () { 896 var video_iframe_inner = $(this).find('.single-card-inner').innerHeight(); 897 //console.log(video_iframe_inner); 898 var calculate_min = video_iframe_inner / 8; 899 var calculate_min_width = calculate_min * 20; 900 $(this).find('iframe').css('min-width', calculate_min_width); 901 }); 902 }, 50); 903 904 applyWhenElementExists('.field--name-field-add-service', function () { 905 $('.field--name-field-add-service .field-items-inner').each(function () { 906 var video_iframe_inner = $(this).innerHeight(); 907 //console.log(video_iframe_inner); 908 var calculate_min = video_iframe_inner / 9; 909 var calculate_min_width = calculate_min * 16; 910 $(this).find('.horizontal-video iframe').css('min-width', calculate_min_width); 911 }); 912 }, 50); 913 914 applyWhenElementExists('.field--name-field-video-link-mobile', function () { 915 $('.field--name-field-video-link-mobile').each(function () { 916 var video_iframe_inner = $(this).parent().innerHeight(); 917 //console.log(video_iframe_inner); 918 var calculate_min = video_iframe_inner / 9; 919 var calculate_min_width = calculate_min * 16; 920 $(this).find('.horizontal-video iframe').css('min-width', calculate_min_width); 921 }); 922 }, 50); 923 924 925 applyWhenElementExists('.field--name-field-add-service', function () { 926 $('.field--name-field-add-service .field-items-inner').each(function () { 927 var video_iframe_inner = $(this).innerHeight(); 928 //console.log(video_iframe_inner); 929 var calculate_min = video_iframe_inner / 16; 930 var calculate_min_width = calculate_min * 9; 931 $(this).find('.vertical-video iframe').css('min-width', calculate_min_width); 932 }); 933 }, 50); 934 935 936 applyWhenElementExists('.blog-dtl-mobile-vdo', function () { 937 $('.blog-dtl-mobile-vdo').each(function () { 938 var video_iframe_inner = $(this).innerHeight(); 939 //console.log(video_iframe_inner); 940 var calculate_min = video_iframe_inner / 9; 941 var calculate_min_width = calculate_min * 16; 942 $(this).find('.vimeo-item').css('min-width', calculate_min_width); 943 }); 944 }, 50); 945 946 applyWhenElementExists('.blog-dtl-desktop-vdo', function () { 947 $('.blog-dtl-desktop-vdo').each(function () { 948 var video_iframe_inner = $(this).innerHeight(); 949 //console.log(video_iframe_inner); 950 var calculate_min = video_iframe_inner / 9; 951 var calculate_min_width = calculate_min * 20; 952 $(this).find('.vimeo-item').css('min-width', calculate_min_width); 953 }); 954 }, 50); 955 956 957 958 // applyWhenElementExists('.block-views-blocknew-blog-view-block-1', function () { 959 // $('.pager__item').each(function(){ 960 // $(this).find('a').removeAttr('href'); 961 // }); 962 // }, 50); 963 964 965 applyWhenElementExists('.service-dtl-video-inner', function () { 966 $('.service-dtl-video-inner .scrl-img-wrapper').each(function () { 967 var video_iframe_inner = $(this).innerHeight(); 968 var calculate_min = video_iframe_inner / 9; 969 var calculate_min_width = calculate_min * 20; 970 $(this).find('.desktop-video .vimeo-item').css('min-width', calculate_min_width); 971 }); 972 }, 50); 973 974 applyWhenElementExists('.service-dtl-video-inner', function () { 975 $('.service-dtl-video-inner .scrl-img-wrapper').each(function () { 976 var video_iframe_inner = $(this).innerHeight(); 977 var calculate_min = video_iframe_inner / 9; 978 var calculate_min_width = calculate_min * 16; 979 $(this).find('.mobile-video .vimeo-item').css('min-width', calculate_min_width); 980 }); 981 }, 50); 982 983 984 985 986 987 988 989 $(window).on('scroll resize', checkVisibility); 990 checkVisibility(); 991 992 applyWhenElementExists('.prtflio-item', function () { 993 ScrollReveal().reveal('.prtflio-item', { 994 // duration: 1000, // Animation duration in milliseconds 995 distance: '50px', // Distance of the element's movement 996 easing: 'ease-out', // Easing for the animation 997 origin: 'bottom', // Where the element starts appearing (bottom, top, left, right) 998 opacity: 0, // Initial opacity of the element 999 // delay: 800 1000 delay: 1200, 1001 interval: 70 1002 }); 1003 }, 50); 1004 1005 // applyWhenElementExists('.prtflio-item', function () { 1006 // if($('.user-login-form').length != 0 ){ 1007 1008 // $('.prtflio-item').each(function () { 1009 // $(this).css('opacity',1); 1010 // }); 1011 // } 1012 // }, 50); 1013 // applyWhenElementExists('.prtflio-item', function () { 1014 // if($('.user-pass').length != 0 ){ 1015 1016 // $('.prtflio-item').each(function () { 1017 // $(this).css('opacity',1); 1018 // }); 1019 // } 1020 // }, 50); 1021 1022 applyWhenElementExists('.user-login-form', function () { 1023 $('.user-login-form').wrapAll('<div class="container"></div>'); 1024 $('.tabs').wrapAll('<div class="container"></div>'); 1025 }, 50); 1026 applyWhenElementExists('.user-pass', function () { 1027 $('.user-pass').wrapAll('<div class="container"></div>'); 1028 $('.tabs').wrapAll('<div class="container"></div>'); 1029 }, 50); 1030 1031 // $(window).on('scroll', function() { 1032 // if($('.user-content-wrapper').length == 0){ 1033 // $('.prtflio-item').each(function (index) { 1034 // if (isInViewport($(this))) {
1035 // var delay = index * 300; 1036 // $(this).delay(delay).animate({ opacity: 1, translateY: 0 }, 1000); 1037 // } 1038 // }) 1039 // } 1040 1041 // }); 1042 1043 // Show the title element 1044 $('.smaller-titles, .text-1').removeClass('d-none').css('opacity', 1); 1045 1046 Splitting(); 1047 1048 ScrollOut({ 1049 targets: '.char', 1050 onShown: function (el) { 1051 $(el).addClass('visible'); 1052 } 1053 }); 1054 1055 anime.timeline() 1056 // Paragraph fade-in, no delay, full block 1057 .add({ 1058 targets: '.text-1 p', 1059 opacity: [0, 1], 1060 duration: 2500, 1061 easing: 'linear', 1062 delay: 0 1063 }) 1064 // Title letters animate staggered from bottom to top, start at same time (0) 1065 .add({ 1066 targets: '.smaller-titles .char', 1067 translateY: [20, 0], 1068 opacity: [0, 1], 1069 duration: 800, 1070 delay: anime.stagger(25, { start: 0 }), 1071 easing: 'easeOutCubic' 1072 }, 0); // "0" means start at timeline 0, same time as paragraph 1073 1074 1075 1076 // anime({ 1077 // targets: '.field--type-text-with-summary .char', 1078 // translateY: [20, 0], 1079 // opacity: [0, 1], 1080 // direction: 'alternate', 1081 // loop: 0, 1082 // delay: anime.stagger(25,{ start: 1000 }), 1083 // easing: 'cubicBezier(.71,-0.77,.43,1.67)' 1084 // }); 1085 1086 1087 1088 applyWhenElementExists('.aboutusportfolioSwiper', function () { 1089 var swiperclient2 = new Swiper(".aboutusportfolioSwiper", { 1090 slidesPerView: 2, 1091 loop: true, 1092 //loopAdditionalSlides: 10, 1093 spaceBetween: 30, 1094 breakpoints: { 1095 576: { 1096 slidesPerView: 3, 1097 }, 1098 768: { 1099 slidesPerView: 3, 1100 }, 1101 1200: { 1102 slidesPerView: 3, 1103 }, 1104 }, 1105 // autoplay: { 1106 // delay: 3000, 1107 // disableOnInteraction: false 1108 // }, 1109 }); 1110 }, 50); 1111 1112 applyWhenElementExists('.dxdrupal', function () { 1113 var relatservice = new Swiper(".dxdrupal", { 1114 slidesPerView: 4, 1115 //loopAdditionalSlides: 20, 1116 loop: true, 1117 spaceBetween: 20, 1118 //direction: 'horizontal', 1119 navigation: { 1120 nextEl: ".swiper-button-next", 1121 prevEl: ".swiper-button-prev", 1122 }, 1123 autoplay: { 1124 delay: 3000, 1125 disableOnInteraction: false 1126 }, 1127 pagination: { 1128 el: '.swiper-pagination', 1129 clickable: true 1130 }, 1131 // breakpoints: { 1132 // 576: { 1133 // slidesPerView: 3, 1134 // }, 1135 // 768: { 1136 // slidesPerView: 3, 1137 // }, 1138 // 1200: { 1139 // slidesPerView: 4, 1140 // }, 1141 // }, 1142 1143 1144 on: { 1145 init: function loopBagFix(relatservice) { 1146 /* 1. Add a copy of the slides */ 1147 if (relatservice.slides.length > 4) { 1148 const slides = relatservice.slides 1149 const wrapper = relatservice.wrapperEl 1150 slides.forEach((slide) => { wrapper.append(slide.cloneNode(true)) }) 1151 1152 /* 2. Remove the duplicated pagination */ 1153 setTimeout(() => { 1154 const paginations = relatservice.pagination.bullets 1155 paginations.forEach((pagination, index) => { 1156 if (index > (paginations.length / 2) - 1) { 1157 pagination.remove() 1158 } 1159 }) 1160 }, 100) 1161 } 1162 }, 1163 } 1164 }); 1165 }, 50); 1166 1167 1168 applyWhenElementExists('.recentBlogSwiper', function () { 1169 var relatservicerecent = new Swiper(".recentBlogSwiper", { 1170 slidesPerView: 4, 1171 //loopAdditionalSlides: 20, 1172 loop: true, 1173 spaceBetween: 20, 1174 //direction: 'horizontal', 1175 // pagination: { 1176 // el: '.recentBlogSwiper-swiper-pagination', 1177 // clickable: true 1178 // }, 1179 autoplay: { 1180 delay: 3000, 1181 disableOnInteraction: false 1182 }, 1183 breakpoints: { 1184 576: { 1185 slidesPerView: 2, 1186 }, 1187 992: { 1188 slidesPerView: 3, 1189 }, 1190 1200: { 1191 slidesPerView: 4, 1192 }, 1193 }, 1194 1195 }); 1196 }, 50); 1197 1198 applyWhenElementExists('.referencePortfolioSwiper', function () { 1199 var relatservicerecentport = new Swiper(".referencePortfolioSwiper", { 1200 slidesPerView: 1, 1201 //loopAdditionalSlides: 20, 1202 loop: true, 1203 spaceBetween: 20, 1204 //direction: 'horizontal', 1205 // pagination: {
1206 // el: '.recentBlogSwiper-swiper-pagination', 1207 // clickable: true 1208 // }, 1209 navigation: { 1210 nextEl: ".swiper-button-next", 1211 prevEl: ".swiper-button-prev", 1212 }, 1213 breakpoints: { 1214 576: { 1215 slidesPerView: 2, 1216 }, 1217 992: { 1218 slidesPerView: 3, 1219 }, 1220 1221 }, 1222 1223 on: { 1224 init: function loopBagFix(relatservicerecentport) { 1225 /* 1. Add a copy of the slides */ 1226 if (relatservicerecentport.slides.length > 3) { 1227 const slides = relatservicerecentport.slides 1228 const wrapper = relatservicerecentport.wrapperEl 1229 slides.forEach((slide) => { wrapper.append(slide.cloneNode(true)) }) 1230 1231 /* 2. Remove the duplicated pagination */ 1232 // setTimeout(() => { 1233 // const paginations = relatservicerecentport.pagination.bullets 1234 // paginations.forEach((pagination, index) => { 1235 // if(index > (paginations.length / 2) - 1){ 1236 // pagination.remove() 1237 // } 1238 // }) 1239 // },100) 1240 } 1241 }, 1242 } 1243 1244 }); 1245 }, 50); 1246 1247 // $("#marqueeLeft").marquee({ 1248 // pausehover: true 1249 // }); 1250 1251 applyWhenElementExists('#marqueeLeft', function () { 1252 const brandsTickers = document.querySelectorAll('#marqueeLeft'); 1253 brandsTickers.forEach(brandsTicker => { 1254 const tickerList = brandsTicker.querySelector('.client-logo-inner'); 1255 const items = Array.from(tickerList.children); 1256 let intervalId; 1257 let isPaused = false; 1258 let scrollAmount = 0; 1259 1260 if (items.length < 20) { 1261 const duplicateCount = 20 - items.length; 1262 for (let i = 0; i < duplicateCount; i++) { 1263 items.forEach(item => { 1264 const clone = item.cloneNode(true); 1265 tickerList.appendChild(clone); 1266 }); 1267 } 1268 } 1269 1270 function startMarquee() { 1271 intervalId = setInterval(function () { 1272 scrollAmount += 1; 1273 brandsTicker.scrollLeft = scrollAmount; 1274 if (scrollAmount >= tickerList.scrollWidth / 2) { 1275 scrollAmount = 0; 1276 } 1277 }, 10); 1278 } 1279 startMarquee(); 1280 1281 }); 1282 // const brandsTicker = document.getElementById('marqueeLeft'); 1283 // const tickerList = brandsTicker.querySelector('.client-logo-inner'); 1284 1285 }, 50); 1286 1287 var test = 0; 1288 $("body").append("" + "<span id = 'd-none'>test</span>"); 1289 $(window).scroll(function () { 1290 1291 var theta = ($(window).scrollTop() / 600) % 3.14; 1292 test = theta; 1293 $("#test").html(test); 1294 $('.rotate-img').css({ transform: 'rotate(' + theta + 'rad)' }); 1295 }); 1296 1297 1298 applyWhenElementExists('#tabs-nav', function () { 1299 $('#tabs-nav li:first-child').addClass('active'); 1300 $('.tab-content').hide(); 1301 $('.tab-content:first').show(); 1302 $('#tabs-nav li').click(function () { 1303 $('#tabs-nav li').removeClass('active'); 1304 $(this).addClass('active'); 1305 $('.tab-content').hide(); 1306 var activeTab = $(this).find('a').attr('href'); 1307 $('.tab-content').removeClass('acttabcntnt'); 1308 $(activeTab).addClass('acttabcntnt'); 1309 $(activeTab).fadeIn(1000); 1310 $('.acttabcntnt .accordion-body').hide(); 1311 $('.acttabcntnt .accordion-body').first().show(); 1312 $(".acttabcntnt .accordion-header:first").addClass("active"); 1313 1314 return false; 1315 }); 1316 }, 50); 1317 1318 applyWhenElementExists('.new-front-scroll-down-btn', function () { 1319 $('.new-front-scroll-down-btn').click(function () { 1320 jQuery('html, body').animate({ 1321 scrollTop: jQuery('.new-front-banner-bottom-wrapper').offset().top - 100 1322 }, 100); 1323 }) 1324 }, 50); 1325 1326 applyWhenElementExists('.site-cookies-wrapper', function () { 1327 if ($('body').hasClass('user-logged-in')) { 1328 $('.site-cookies-wrapper').remove(); 1329 } 1330 }, 50); 1331 1332 // applyWhenElementExists('.block-superfishmoonworks-new-menu', function () { 1333 // $(".block-superfishmoonworks-new-menu ul li").each(function(){ 1334 // $(this).find('a').removeClass('sf-depth-1'); 1335 // }) 1336 // }, 50); 1337 1338 applyWhenElementExists('.hamburglar', function () { 1339 $(".hamburglar").click(function () { 1340 $('html').addClass('menu-open-staging'); 1341 setTimeout(function () { 1342 $('html').addClass('video-show'); 1343 }, 5000); 1344 })
1345 $(".close-hamburger-staging").click(function () { 1346 $('html').removeClass('menu-open-staging'); 1347 $('html').removeClass('click-menu-open'); 1348 $('html').removeClass('video-show'); 1349 }) 1350 }, 50); 1351 1352 applyWhenElementExists('.new-front-diensten-wrapper .field-item-rating', function () { 1353 $('.new-front-diensten-wrapper .field-item-rating').remove(); 1354 }, 50); 1355 1356 applyWhenElementExists('.new-menu-diensten-wrapper .crd-cnt', function () { 1357 var a = 1; 1358 $('.new-menu-diensten-wrapper .crd-cnt').each(function () { 1359 $(this).find('span').text('0' + a); 1360 a++; 1361 }) 1362 }, 50); 1363 1364 /*applyWhenElementExists('.new-menu-diensten-wrapper .card-hover-wrapper', function () { 1365 1366 $('.new-menu-diensten-wrapper .card-hover-wrapper .link a').text('Alle Dienstenllen') 1367 }, 50);*/ 1368 1369 applyWhenElementExists('.new-front-diensten-wrapper .card-hover-wrapper', function () { 1370 1371 $('.new-front-diensten-wrapper .card-hover-wrapper').remove(); 1372 1373 }, 50); 1374 1375 applyWhenElementExists('.accordion', function () { 1376 1377 1378 $('.accordion-body').hide(); 1379 $('.accordion-body').first().show(); 1380 $(".accordion-header:first").addClass("active"); 1381 1382 $('.accordion-header').each(function () { 1383 $(this).unbind().click(function () { 1384 if ($(this).hasClass('active')) { 1385 $(".accordion-header").removeClass("active"); 1386 $(this).next(".accordion-body").removeClass('active').slideUp(); 1387 } else { 1388 $(".accordion-header").removeClass("active"); 1389 $(".accordion-body").removeClass('active').slideUp(); 1390 $(this).addClass('active'); 1391 $(this).next(".accordion-body").addClass('active').slideDown(); 1392 } 1393 }); 1394 }); 1395 1396 }, 50); 1397 1398 1399 applyWhenElementExists('.block-views-blocknew-blog-view-mobile-block-1', function () { 1400 1401 $('.inf-scrl-btn').click(function () { 1402 $('.inf-scrl-btn').addClass('active-refersh') 1403 setTimeout(function () { 1404 //$('#myButton').addClass('highlight'); 1405 $('.block-views-blocknew-blog-view-mobile-block-1 .pager .pager__item a').click(); 1406 $('.inf-scrl-btn').removeClass('active-refersh'); 1407 }, 3000); // 3000 milliseconds = 3 seconds 1408 }) 1409 1410 }, 50); 1411 // applyWhenElementExists('#blogvimeoPlayer', function () { 1412 // $('#pauseButton').hide(); 1413 // var iframe = document.getElementById('blogvimeoPlayer'); 1414 1415 // // Function to send postMessage to Vimeo iframe 1416 // function sendMessage(command) { 1417 // var message = JSON.stringify({ method: command }); 1418 // iframe.contentWindow.postMessage(message, 'https://player.vimeo.com'); 1419 // } 1420 1421 // // Play button 1422 // $('#playButton').click(function () { 1423 // sendMessage('play'); 1424 // $('#pauseButton').show(); 1425 // $('#playButton').hide(); 1426 // }); 1427 1428 // // Pause button 1429 // $('#pauseButton').click(function () { 1430 // sendMessage('pause'); 1431 // $('#pauseButton').hide(); 1432 // $('#playButton').show(); 1433 // }); 1434 // }, 50); 1435 1436 // applyWhenElementExists('#blogvimeoPlayer2', function () { 1437 // $('#pauseButton2').hide(); 1438 // var iframe = document.getElementById('blogvimeoPlayer2'); 1439 1440 // // Function to send postMessage to Vimeo iframe 1441 // function sendMessage(command) { 1442 // var message = JSON.stringify({ method: command }); 1443 // iframe.contentWindow.postMessage(message, 'https://player.vimeo.com'); 1444 // } 1445 1446 // // Play button 1447 // $('#playButton2').click(function () { 1448 // sendMessage('play'); 1449 // $('#pauseButton2').show(); 1450 // $('#playButton2').hide(); 1451 // }); 1452 1453 // // Pause button 1454 // $('#pauseButton2').click(function () { 1455 // sendMessage('pause'); 1456 // $('#pauseButton2').hide(); 1457 // $('#playButton2').show(); 1458 // }); 1459 // }, 50); 1460 applyWhenElementExists('.cookiesjsr-banner--links', function () { 1461 $('.cookiesjsr-banner--info').append($('.cookiesjsr-banner--links li').html()); 1462 $('.cookiesjsr-banner--links').hide(); 1463 }, 50); 1464 1465 // applyWhenElementExists('.messages__wrapper p', function () { 1466 // $('.messages__wrapper p').text() 1467 // if($('.messages__wrapper p').text().indexOf('The page you requested does not exist') != -1){ 1468 1469 // $('.messages__wrapper').remove(); 1470 // } 1471 // }, 50); 1472 1473 applyWhenElementExists('.search-advanced', function () { 1474 $('.search-advanced').hide() 1475 1476 }, 50); 1477 1478 1479 applyWhenElementExists('.table-foot', function () { 1480 $('.table-foot tr:first').remove(); 1481 1482 }, 50); 1483 1484 1485 1486 1487 applyWhenElementExists('.contact-bnr-scrl', function () { 1488 $('.contact-bnr-scrl').click(function (e) { 1489 e.preventDefault(); 1490 1491 1492 var offset4 = $(".form-faq-map-wrapper").offset().top; 1493 var scrollTo4 = offset4 - 150; 1494 $('html, body').animate({ 1495 scrollTop: scrollTo4 1496 }, 1000); 1497 1498 }) 1499 1500 }, 50); 1501 1502 1503 // applyWhenElementExists('.webform-submission-contact-form', function () { 1504 // var $input4 = $('.form-item-ik-ga-akkoord-met-de-privacy-policy label input'); 1505 // var labelText4 = $('.form-item-ik-ga-akkoord-met-de-privacy-policy label').contents().filter(function () { 1506 // return this.nodeType === 3; // Node.TEXT_NODE 1507 // }).text().trim(); 1508 // var newLabel4 = $('<label class="ik-ga-akkoord-met-de-privacy-policy-lbl" for="edit-ik-ga-akkoord-met-de-privacy-policy"></label>').html($(".form-item-ik-ga-akkoord-met-de-privacy-policy .description .webform-element-description").html()); 1509 // newLabel4.prependTo('.form-item-ik-ga-akkoord-met-de-privacy-policy'); 1510 // $input4.prependTo('.form-item-ik-ga-akkoord-met-de-privacy-policy'); 1511 // $(".form-item-ik-ga-akkoord-met-de-privacy-policy .control-label").remove(); 1512 // $(".form-item-ik-ga-akkoord-met-de-privacy-policy .description").remove(); 1513 // var $input5 = $('.form-item-ik-ga-akkoord-met-de label input'); 1514 // var labelText5 = $('.form-item-ik-ga-akkoord-met-de label').contents().filter(function () { 1515 // return this.nodeType === 3; // Node.TEXT_NODE 1516 // }).text().trim(); 1517 // var newLabel5 = $('<label class="ik-ga-akkoord-met-de-lbl" for="edit-ik-ga-akkoord-met-de"></label>').html($(".form-item-ik-ga-akkoord-met-de .description .webform-element-description").html()); 1518 // newLabel5.prependTo('.form-item-ik-ga-akkoord-met-de'); 1519 // $input5.prependTo('.form-item-ik-ga-akkoord-met-de'); 1520 // $(".form-item-ik-ga-akkoord-met-de .control-label").remove(); 1521 // $(".form-item-ik-ga-akkoord-met-de .description").remove(); 1522 // }, 50); 1523 1524 applyWhenElementExists('.webform-submission-prijs-website-form', function () { 1525 // $(".webform-submission-prijs-website-form").addClass("container"); 1526 1527 $(".item-450").change(function () { 1528 if ($(this).is(':checked')) { 1529 var number = parseInt($(".lbl-450").text().match(/\d+/)[0]); 1530 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1531 var sum = tot_val + number; 1532 $(".js-form-item-totaal input").attr("value", sum); 1533 } else { 1534 var number = parseInt($(".lbl-450").text().match(/\d+/)[0]); 1535 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1536 var subt = tot_val - number; 1537 $(".js-form-item-totaal input").attr("value", subt); 1538 1539 } 1540 }) 1541 1542 $(".item-200").change(function () { 1543 if ($(this).is(':checked')) { 1544 var number = parseInt($(".lbl-200").text().match(/\d+/)[0]); 1545 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1546 var sum = tot_val + number; 1547 $(".js-form-item-totaal input").attr("value", sum); 1548 } else { 1549 var number = parseInt($(".lbl-200").text().match(/\d+/)[0]); 1550 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1551 var subt = tot_val - number; 1552 $(".js-form-item-totaal input").attr("value", subt); 1553 1554 } 1555 }) 1556 1557 $(".item-250").change(function () { 1558 if ($(this).is(':checked')) { 1559 var number = parseInt($(".lbl-250").text().match(/\d+/)[0]); 1560 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1561 var sum = tot_val + number; 1562 $(".js-form-item-totaal input").attr("value", sum); 1563 } else { 1564 var number = parseInt($(".lbl-250").text().match(/\d+/)[0]); 1565 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1566 var subt = tot_val - number; 1567 $(".js-form-item-totaal input").attr("value", subt); 1568 1569 } 1570 }) 1571 1572 $(".item-150").change(function () { 1573 if ($(this).is(':checked')) { 1574 var number = parseInt($(".lbl-150").text().match(/\d+/)[0]); 1575 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1576 var sum = tot_val + number; 1577 $(".js-form-item-totaal input").attr("value", sum); 1578 } else { 1579 var number = parseInt($(".lbl-150").text().match(/\d+/)[0]); 1580 var tot_val = parseInt($(".js-form-item-totaal input").attr("value")); 1581 var subt = tot_val - number; 1582 $(".js-form-item-totaal input").attr("value", subt); 1583 1584 } 1585 }) 1586 1587 $(".js-form-item-totaal").wrap('<div class="js-form-item-totaal-wrapper"></div>'); 1588 1589 }, 50); 1590 1591 1592 applyWhenElementExists('.webform-submission-prijs-website-form', function () { 1593 //form-item-field-ontwerp-briefpapier-150 1594 1595 var $input4 = $('.form-item-newsletter-checkbox label input'); 1596 1597 var labelText4 = $('.form-item-newsletter-checkbox label').contents().filter(function () { 1598 return this.nodeType === 3; // Node.TEXT_NODE 1599 }).text().trim(); 1600 1601 var newLabel4 = $('<label class="form-item-newsletter-checkbox-lbl" for="edit-newsletter-checkbox"></label>').html($(".form-item-newsletter-checkbox .description .webform-element-description").html()); 1602 1603 newLabel4.prependTo('.form-item-newsletter-checkbox'); 1604 $input4.prependTo('.form-item-newsletter-checkbox'); 1605 1606 1607 $(".form-item-newsletter-checkbox .control-label").remove(); 1608 $(".form-item-newsletter-checkbox .description").remove(); 1609 1610 // 1611 1612 var $input5 = $('.form-item-newsletter-checkbox1 label input'); 1613 1614 var labelText5 = $('.form-item-newsletter-checkbox1 label').contents().filter(function () { 1615 return this.nodeType === 3; // Node.TEXT_NODE 1616 }).text().trim(); 1617 1618 var newLabel5 = $('<label class="form-item-newsletter-checkbox1-lbl" for="edit-newsletter-checkbox1"></label>').html($(".form-item-newsletter-checkbox1 .description .webform-element-description").html()); 1619 1620 1621 newLabel5.prependTo('.form-item-newsletter-checkbox1'); 1622 $input5.prependTo('.form-item-newsletter-checkbox1'); 1623 1624 1625 $(".form-item-newsletter-checkbox1 .control-label").remove(); 1626 $(".form-item-newsletter-checkbox1 .description").remove(); 1627 1628 1629 }, 50); // webform-submission-prijs-logo-new-form check close 1630 1631 1632 applyWhenElementExists('.webform-submission-prijs-logo-new-form', function () { 1633 var $input4 = $('.form-item-newsletter-checkbox label input'); 1634 var labelText4 = $('.form-item-newsletter-checkbox label').contents().filter(function () { 1635 return this.nodeType === 3; // Node.TEXT_NODE 1636 }).text().trim(); 1637 var newLabel4 = $('<label class="form-item-newsletter-checkbox-lbl" for="edit-newsletter-checkbox"></label>').html($(".form-item-newsletter-checkbox .description .webform-element-description").html()); 1638 newLabel4.prependTo('.form-item-newsletter-checkbox'); 1639 $input4.prependTo('.form-item-newsletter-checkbox'); 1640 $(".form-item-newsletter-checkbox .control-label").remove(); 1641 $(".form-item-newsletter-checkbox .description").remove(); 1642 var $input5 = $('.form-item-newsletter-checkbox1 label input'); 1643 var labelText5 = $('.form-item-newsletter-checkbox1 label').contents().filter(function () { 1644 return this.nodeType === 3; // Node.TEXT_NODE 1645 }).text().trim(); 1646 var newLabel5 = $('<label class="form-item-newsletter-checkbox1-lbl" for="edit-newsletter-checkbox1"></label>').html($(".form-item-newsletter-checkbox1 .description .webform-element-description").html()); 1647 newLabel5.prependTo('.form-item-newsletter-checkbox1'); 1648 $input5.prependTo('.form-item-newsletter-checkbox1'); 1649 $(".form-item-newsletter-checkbox1 .control-label").remove(); 1650 $(".form-item-newsletter-checkbox1 .description").remove(); 1651 }, 50); 1652 1653 1654 applyWhenElementExists('.paragraph-field-link-2', function () { 1655 $(".paragraph-field-link-2").each(function () { 1656 $(this).find('a').click(function (e) { 1657 e.preventDefault(); 1658 let value = $(this).attr('data-prijj'); 1659 Cookies.set('prijval', value); 1660 window.location.href = '/prijs-webdesign'; 1661 // console.log(Cookies.get('prijval')); 1662 // Cookies.remove('prijval'); 1663 }) 1664 }) 1665 }, 50); 1666 1667 }); 1668 $(document).ajaxComplete(function () { 1669 1670 applyWhenElementExists('.search-advanced', function () { 1671 $('.search-advanced').hide() 1672 1673 }, 50); 1674 1675 applyWhenElementExists('.block-views-blocknew-blog-view-mobile-block-1', function () { 1676 1677 $('.inf-scrl-btn').click(function () { 1678 $('.inf-scrl-btn').addClass('active-refersh') 1679 setTimeout(function () { 1680 //$('#myButton').addClass('highlight'); 1681 $('.block-views-blocknew-blog-view-mobile-block-1 .pager .pager__item a').click(); 1682 $('.inf-scrl-btn').removeClass('active-refersh'); 1683 }, 3000); // 3000 milliseconds = 3 seconds 1684 }) 1685 1686 }, 50); 1687 }); 1688 1689})(jQuery, Drupal);
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.