Adding a class to the active tab [closed]

I have update in codepan js code. please use below js code to active tab. i have tested and it is working fine. let me know if this works for you! class TabList { constructor(buttonsContainer, tabs) { this.buttonsContainer = buttonsContainer; this.tabs = tabs; this.buttonsContainer.addEventListener(“click”, event => { document.querySelector( ‘.woocommerce-tabs__button–active’ ).classList.remove( ‘woocommerce-tabs__button–active’ ); event.target.closest(“.woocommerce-tabs__button”).classList.add(“woocommerce-tabs__button–active”); const index … Read more

WordPress Block.js SVG createElement

Basically, when using wp.element.createElement(), For attribute names having special characters like a hypen/-, the name should be put in single/double quotes: e.g. ‘data-name’ and not simply data-name. createElement( ‘svg’, { ‘data-name’: ‘Layer 1’ // like this data-name: ‘Layer 1’ // not this } ); The same also goes to attribute names like class which is … Read more