source/fonts.js
// Highlight the selected list box (familyList or sizeList)

Highlight the selected list box (familyList or sizeList)
Highlight the selected list box ( familyList or sizeList )
function selectElement(element) {
    const parentUL = element.closest('ul')
    if (parentUL) {
      const nodeList = parentUL.querySelectorAll('li')
      for (let i = 0; i < nodeList.length; i++) {
        nodeList[i].classList.remove('selected')
      }
      element.classList.add('selected')
    }
  }
function selectElement ( element ) { const parentUL = element . closest ( 'ul' ) if ( parentUL ) { const nodeList = parentUL . querySelectorAll ( 'li' ) for ( let i = 0 ; i < nodeList . length ; i ++ ) { nodeList [ i ] . classList . remove ( 'selected' ) } element . classList . add ( 'selected' ) } }
Highlight the selected list box (familyList or sizeList)
Highlight the selected list box ( familyList or sizeList )
// Remove 'selected' class from all list elements
 // Add 'selected' to clicked list element
