1document.addEventListener('DOMContentLoaded', function () { 2 // Attach an event listener to the "Copy" button 3 const copyButton = document.querySelector('.Button .fa.fa-copy'); 4 5 if (copyButton) { 6 // Add a click event to the parent "div" containing the button 7 copyButton.closest('.Button').addEventListener('click', function (e) { 8 e.preventDefault(); 9 10 // Get the values of the first attendee's fields 11 const firstAttendeeFields = document.querySelectorAll('.attendee-info:first-of-type input, .attendee-info:first-of-type select'); 12 13 // Loop through each attendee row and copy the values 14 document.querySelectorAll('.attendee-info').forEach((attendeeRow, index) => { 15 if (index > 0) { // Skip the first attendee row 16 const attendeeFields = attendeeRow.querySelectorAll('input, select'); 17 attendeeFields.forEach((field, i) => { 18 field.value = firstAttendeeFields[i].value; 19 }); 20 } 21 }); 22 23 alert('Attendee information copied to all tickets!'); 24 }); 25 } 26});
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.