addTriggers(element) {
        const triggers = element.querySelectorAll(`[${this.TRIGGER}]`);

        triggers.forEach((trigger) => {
            const toggleClass = trigger.getAttribute(this.TRIGGER);
            const targetId = trigger.getAttribute(this.DART);

            trigger.addEventListener('click', (event) => {
                const targets = document.querySelectorAll(`[${this.TARGET}="${targetId}"]`);

                targets.forEach((target) => {
                    target.classList.toggle(toggleClass);
                })
            });
        });
    }
/**
     * Adds event listeners to the link items.
     * 
     * @param {*} element   The navbar element to add triggers to
     */
Adds event listeners to the link items.

@param {*} element   The navbar element to add triggers to
Adds event listeners to the link items . @param { * } element The navbar element to add triggers to
addTriggers(element) {
        const triggers = element.querySelectorAll(`[${this.TRIGGER}]`);
        triggers.forEach((trigger) => {
            const toggleClass = trigger.getAttribute(this.TRIGGER);
            const targetId = trigger.getAttribute(this.DART);
            trigger.addEventListener('click', (event) => {
                const targets = document.querySelectorAll(`[${this.TARGET}="${targetId}"]`);
                targets.forEach((target) => {
                    target.classList.toggle(toggleClass);
                })
            });
        });
    }
addTriggers ( element ) { const triggers = element . querySelectorAll ( ` ${ this . TRIGGER } ` ) ; triggers . forEach ( ( trigger ) => { const toggleClass = trigger . getAttribute ( this . TRIGGER ) ; const targetId = trigger . getAttribute ( this . DART ) ; trigger . addEventListener ( 'click' , ( event ) => { const targets = document . querySelectorAll ( ` ${ this . TARGET } ${ targetId } ` ) ; targets . forEach ( ( target ) => { target . classList . toggle ( toggleClass ) ; } ) } ) ; } ) ; }
Adds event listeners to the link items.
Adds event listeners to the link items .