Universeorange.com/Docs/

Priya library Function reference Element functions toggleClass

    ready(() => {
        let element = select('#root');
        element.toggleClass('selected')
        console.log(element);
        element.toggleClass('selected');
        console.log(element);
    });

This function toggles a class from an element. selected in this case and if the class exists, class will be removed and if the class doesn't exist, it will be added.

Last modified: 2021-06-07

© 2021 universeorange.com