1const customnNewsletterSelect = document.querySelector(".newsletter-signup-custom-select"); 2const selectNewsletterSelectBtn = document.querySelector(".newsletter-signup-custom-select--button"); 3 4const selectedNewsletterSelectValue = document.querySelector(".newsletter-signup-custom-select--value"); 5const optionsNewsletterSelectList = document.querySelectorAll(".newsletter-signup-custom-select--dropdown li"); 6 7// add click event to select button 8selectNewsletterSelectBtn.addEventListener("click", () => { 9 // add/remove active class on the container element 10 customnNewsletterSelect.classList.toggle("active"); 11 // update the aria-expanded attribute based on the current state 12 selectNewsletterSelectBtn.setAttribute( 13 "aria-expanded", 14 selectNewsletterSelectBtn.getAttribute("aria-expanded") === "true" ? "false" : "true" 15 ); 16}); 17 18/* 19optionsNewsletterSelectList.forEach((option) => { 20 function handler(e) { 21 // Click Events 22 if (e.type === "click" && e.clientX !== 0 && e.clientY !== 0) { 23 selectedNewsletterSelectValue.textContent = this.children[1].textContent; 24 customnNewsletterSelect.classList.remove("active"); 25 } 26 // Key Events 27 if (e.key === "Enter") { 28 selectedNewsletterSelectValue.textContent = this.textContent; 29 customnNewsletterSelect.classList.remove("active"); 30 } 31 } 32 33 option.addEventListener("keyup", handler); 34 option.addEventListener("click", handler); 35}); 36*/ 37jQuery('.wpcf7-radio.title input[type="radio"]').change(function(){ 38 var value = jQuery( this ).val(); 39 //alert(value); 40 jQuery('.newsletter-signup-custom-select--value').text(value); 41 jQuery( '.newsletter-signup-custom-select' ).removeClass( 'active' ); 42});
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.