I tried to add and remove a class on an HTML element using jQuery. It successfully adds the class, but the page link in my navbar didn't take me to the related page. How to solve this problem? Here is my I tried to add and remove a class on an HTML el