Back to FAQ-guidelines
JavaScriptThe latest version of this package is: 0.18.6, Opens in new window
JavaScript library for the FAQ Component
This component is compatible with ESM (ES6 module) and IIFE. See documentation examples below.
To be able to install this component, please refer to the Project Setup documentation.
$ npm i @ids-js/faq@0.18.6
Table of Contents
Usage
To initialize follow these steps:
Add markup
<div class="if faqs">
<details class="if faq">
<summary class="if question">Vem gäller hemförsäkringen för?</summary>
<div class="if answer">
<content>
</div>
</details>
<details class="if faq">
…
</details>
…
</div>
Add JavaScript
By script tag
<script src="/faq.iife.js"></script>
<script>
IDSFaq.faq();
</script>
As an ES6 module
import { faq as IDSFaq } from '@ids-js/faq';
IDSFaq();
Changelog
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.17.0 (2021-10-21)
Code Refactoring
- 💡 Remove support for CommonJS (9f84d9a)
BREAKING CHANGES
- 🧨 We have removed the support for CommonJS for all @ids-js packages
0.16.1 (2021-10-21)
Bug Fixes
- Use common for cjs and main for esm (96f673d)
0.12.1 (2021-10-01)
Bug Fixes
- 🐛 Export lib vars for external consumption (bcfe091)
0.12.0 (2021-10-01)
Features
- 🎸 Add faq js (6496caf)