How to add active class dynamically October 21, 2022 by Tarik Billa You should change $i == 1 to $i++ == 1