UNPKG

@financial-times/o-toggle

Version:

Utility that provides toggle (show/hide) behaviour to a <button> or <a> tag and a target.

13 lines (9 loc) 287 B
import Toggle from './src/js/toggle.js'; const constructAll = () => { Toggle.init(); document.removeEventListener('o.DOMContentLoaded', constructAll); }; if (typeof document !== 'undefined') { document.addEventListener('o.DOMContentLoaded', constructAll); } export default Toggle;