1class accordion { 2 constructor(hashCode) { 3 $(document).ready(function () { 4 $(`#accordion-module-${hashCode} .accordion-button`).on("click", function () { 5 setTimeout(() => { 6 // Encontre o elemento titleAccordion dentro do botão clicado 7 var accordionTop = $(this).find(".titleAccordion"); 8 if (accordionTop.length > 0) { 9 10 // Obtenha a posição superior do elemento titleAccordion 11 var topOffset = accordionTop.offset().top; 12 13 // Obtenha a altura do cabeçalho 14 var headerHeight = getHeightHeader(); 15 16 var accordionPosition = topOffset - headerHeight - 15; 17 18 window.scrollTo({ 19 top: accordionPosition, 20 behavior: 'smooth' 21 }); 22 } 23 24 }, 500); 25 }); 26 }); 27 } 28}
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.