1/** 2 * Faq js for admin. 3 * 4 * @package Ie_Faq_Section 5 */ 6 7jQuery( document ).ready( 8 function(){ 9 const accordionContent = document.querySelectorAll( '.accordion' ); 10 if (accordionContent.length === 0) { 11 return; 12 } 13 14 accordionContent.forEach( ( item, index ) => { 15 let header = item.querySelector( '.accordion__header' ); 16 if (!header) { 17 return; 18 } 19 header.addEventListener( 20 'click', () => { 21 item.classList.toggle( 'active' ); 22 let description = item.querySelector( '.accordion__body' ); 23 if ( item.classList.contains( 'active' ) ) { 24 description.style.height = `${description.scrollHeight}px`; 25 } else { 26 description.style.height = '0px'; 27 } 28 removeOpen( index ); 29 } 30 ); 31 } 32 ); 33 34 function removeOpen( index1 ) { 35 accordionContent.forEach( 36 ( item2, index2 ) => { 37 if ( index1 != index2 ) { 38 item2.classList.remove( 'active' ); 39 let descr = item2.querySelector( '.accordion__body' ); 40 descr.style.height = '0px'; 41 } 42 } 43 ); 44 } 45 } 46 ); 47
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.