1//document.querySelectorAll('.fieldContact').forEach(field => { 2// const input = field.querySelector('input, textarea, select'); 3// const label = field.querySelector('.inputTextContact'); 4 5// function toggle() { 6// if (input.value && input.value !== '') { 7// field.classList.add('has-value'); 8// } else { 9// field.classList.remove('has-value'); 10// } 11// } 12 13// input.addEventListener('input', toggle); 14// input.addEventListener('change', toggle); 15// input.addEventListener('blur', toggle); 16// toggle(); // estado inicial 17//}); 18 19 20 21document.addEventListener('DOMContentLoaded', function () { 22 document.querySelectorAll('.fieldContact').forEach(field => { 23 const input = field.querySelector('input, textarea, select'); 24 if (!input) return; 25 26 const checkValue = () => { 27 if (input.value && input.value.trim() !== '') { 28 field.classList.add('has-value'); 29 } else { 30 field.classList.remove('has-value'); 31 } 32 }; 33 34 input.addEventListener('input', checkValue); 35 input.addEventListener('change', checkValue); 36 checkValue(); // estado inicial 37 }); 38});
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.