/*! * jsa.js – JavaScript Accordion Utility * Version: 2.1.1 * Author: Homero Cavazos * GitHub: https://github.com/homiehomes * License: MIT * Website: https://homiehomes.dev * Description: A simple JavaScript accordion component. * * opts = { * dl: ".jsa", // Selector for the definition list * dt: "dt a", // Selector for the term elements * dd: "dd", // Selector for the definition elements * theme: '', // options: '', 'minimal' 'core' * openFirst: false, // Whether to open the first item on load * openAll: false, // Whether to open all items on load * closeAll: null, // Selector e.g. Close All * closeOthers: false, // Whether to close other items when one is opened * animate: false, // Whether to animate the opening and closing of items * prefix: '', // Prefix for IDs and data attributes (optional) * icons: [ * '+', // text * myImgElement, // DOM node * '/images/chevron.svg' // URL * ], [] for no icons * iconClass: 'jsa-icon', // Class for the icon span * termPadding: '1em', // Padding for dt elements when theme is 'custom' * schema: false, // Whether to include FAQ schema * schemaType: 'FAQPage', // Schema type, default is 'FAQPage' * termBg: '', // Background color for term elements ('core' theme) * termBgActive: '', // Background color for active term elements ('core' theme) * termColor: '', // Text color for term elements ('core' theme) * termColorActive: '', // Text color for active term elements ('core' theme) * borderColor: '', // Border color for term elements ('core' theme) * darkmode: false, * */