1document.querySelectorAll('.uk-form-floating .uk-input').forEach(function(input) { 2 // Function to update label class based on input value 3 function updateLabelClass() { 4 var label = input.parentNode.previousElementSibling; 5 if (input.value) { 6 label.classList.add('uk-label-floated'); 7 } else { 8 label.classList.remove('uk-label-floated'); 9 } 10 } 11 12 // Add focus event listener to each input 13 input.addEventListener('focus', function() { 14 // Ensure the label is floated when focused 15 this.parentNode.previousElementSibling.classList.add('uk-label-floated'); 16 }); 17 18 // Add blur event listener to each input 19 input.addEventListener('blur', updateLabelClass); 20 21 // Initial check to apply class if input has a value on page load 22 updateLabelClass(); 23});
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.