1(function ($, Drupal, window, document, drupalSettings) { 2 'use strict'; 3 var executedOnce = false; 4 Drupal.behaviors.homepage = { 5 attach: function (context, settings) { 6 // Function calls. 7 if (!executedOnce) { 8 slickHomePage(); 9 executedOnce = true; 10 } 11 12 // tabindex added to form select option 13 jQuery('.js-form-item').attr('tabindex', '0'); 14 15 //Select box css styling specific to homepage 16 jQuery('.page_node_homepage_new .ui-menu.ui-widget.ui-widget-content.ui-autocomplete.ui-front').css({ 17 "width": "100%", 18 "max-width": "500px", 19 "max-height": "230px", 20 "overflow-y": "auto", 21 "padding": "2px", 22 }); 23 jQuery('.page_node_homepage_new .ui-menu .ui-menu-item').css({ 24 "padding": "10px 5px", 25 }); 26 27 function slickHomePage() { 28 //New Homepage Designs 29 jQuery('.facts-slider').slick({ 30 slidesToShow: 1, 31 slidesToScroll: 1, 32 autoplay: true, 33 fade: true, 34 autoplaySpeed: 2000, 35 speed: 900, 36 dots: false, 37 arrows: false, 38 infinite: true, 39 cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 40 touchThreshold: 100 41 }); 42 } 43 jQuery('.form-select').change(function (event) { 44 // if (jQuery('.icon-wrapper').hasClass('slick-initialized')) { 45 // jQuery('.icon-wrapper').slick('unslick'); 46 // } 47 }); 48 49 50 //banner Video Speed reduce 51 if (jQuery('.banner-img-video video').length) { 52 document.querySelector('.banner-img-video video').playbackRate = .5; 53 } 54 55 //Popup box open on button click 56 jQuery('.about-us .play-btn-outer').click(function () { 57 var buttonId = $(this).attr('id'); 58 $('#modal-container').removeAttr('class').addClass(buttonId); 59 $('body').addClass('modal-active'); 60 var videoLink = jQuery(".videosrc").text(); 61 jQuery(".modal").html("<div class='cross'></div><button class='play-btn play-btn-inner'> </button></div><video id='video' class='video' controls type='video/mp4'></video>"); 62 var video = document.getElementById('video'); 63 var source = document.createElement('source'); 64 source.setAttribute('src', videoLink); 65 video.appendChild(source); 66 67 jQuery(".modal .play-btn-inner").on("click", function () { 68 var video = jQuery('.video'); 69 video.trigger("play"); 70 jQuery(".modal .play-btn-inner").css("display", "none"); 71 }); 72 73 jQuery('.modal .cross').on("click", function () { 74 var video = jQuery('.video'); 75 video.trigger("pause"); 76 $('#modal-container,.modal-container').addClass('out'); 77 $('body').removeClass('modal-active'); 78 jQuery(".modal .play-btn-inner").css("display", "block"); 79 }); 80 81 }) 82 83 $(window).keydown(function (e) { 84 if (e.which == 32) { 85 if (video.paused === false) { 86 video.pause(); 87 } else { 88 video.play(); 89 } 90 91 return false; 92 93 } 94 }); 95 96 jQuery(document).on("click", ".explore_single .exploreHover a", function () { 97 var approvalsId = jQuery(this)?.next()[0]?.children[0]?.getAttribute("data-id"); 98 localStorage.setItem('approvalsId', approvalsId); 99 }); 100 101 jQuery(document).ajaxComplete(function () { 102 jQuery(document).on("click", ".state_single .stateHover a", function () { 103 var approvalsId = jQuery(this).next()[0].children[0].getAttribute("data-id"); 104 localStorage.setItem('approvalsId', approvalsId); 105 }); 106 }); 107 108 // dsc-popup 109 $(document).ready(function () { 110 const hasPopupBeenShown = 111 window.performance.getEntriesByType("navigation")[0].type === 112 "reload" || 113 (window.performance.getEntriesByType("navigation")[0].type === 114 "navigate" && 115 JSON.parse(sessionStorage.getItem("popupShown")) === true); 116 if (!hasPopupBeenShown && hasPopupBeenShown != null) { 117 $(".dsc-popup").css("display", "flex"); 118 jQuery("body").css("overflow", "hidden"); 119 $("#close-popup").click(function () { 120 $(".dsc-popup").hide(); 121 $(".dsc1-popup").show(); 122 $(".dsc1-popup").css("display", "flex");
123 sessionStorage.setItem("popupShown", true); 124 jQuery("body").css("overflow", "auto"); 125 }); 126 } 127 }); 128 129 //Udyam PopUp 130 $(document).ready(function () { 131 $(".dsc1-popup").click(function () { 132 $(".dsc1-popup").hide(); 133 sessionStorage.setItem("popupShown", true); 134 jQuery("body").css("overflow", "auto"); 135 }); 136 }); 137 }, 138 }; 139})(jQuery, Drupal, this, this.document, drupalSettings);
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.