1jQuery(function($){ 2 'use strict'; 3 4 ND.forms = function(){ 5 6 7 ND.forms.activator(); 8 ND.forms.addPageUrl(); 9 10 }; 11 12 ND.forms.activator = function(){ 13 14 15 document.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea').forEach(input => { 16 const container = input.closest('.nd-input-container'); 17 18 // Aggiungi la classe "activated" al contenitore quando l'input è in focus 19 input.addEventListener('focus', () => { 20 container.classList.add('is-activated'); 21 }); 22 23 // Rimuovi la classe "activated" se l'input è vuoto quando perdi il focus 24 input.addEventListener('blur', () => { 25 if (input.value.trim() === '') { 26 container.classList.remove('is-activated'); 27 } 28 }); 29 }); 30 } 31 32 ND.forms.addPageUrl = function () { 33 34 const cf7Forms = $('form.wpcf7-form'); 35 const pageUrl = document.body.getAttribute('data-page-url'); 36 37 if (pageUrl) { 38 39 40 let pageUrlField = cf7Forms.find('input[name="page_url"]'); 41 if (pageUrlField.length > 0 && pageUrl){ 42 pageUrlField.val(pageUrl); 43 } 44 45 46 } 47 48 49 50 51 52 } 53});
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.