To remove the class from all elements you can select all elements and use the classList.remove() method on all of them using a loop.
// selecting all elements let items = document.querySelectorAll('.items'); // Using forEach loop items.forEach(function(item) { item.classList.remove('active'); });
從平面設計(主要是靜態網頁設計)、UI/UX、前端,一路上不是走得順遂,但我喜歡這條路上發生的很多過程,不斷學到東西還有新功能帶來的興奮感,我覺得讓我很有成就感,尤其是當程式有回饋反應的時候,真的會很感動。Hover or Function click ‘hello world’ 就足以讓我興奮不已。