Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
376 B
2
Indexable
Never
 <script>
        const $ = document.querySelector.bind(document)
        const $$ = document.querySelectorAll.bind(document)

        const tabs = $$('.tab-item')
        const panes = $$('.tab-pane')

        tabs.forEach((tab, index) => {
            tab.onclick = function() {
                this.classList.add('active')
            }
        })
    </script>
Leave a Comment