Solution:1
According to WordPress Code reference page: wp_nav_menu()#menu-item-css-classes, the class below is added to menu items that correspond to the currently rendered page.
.current-menu-item
So, basically what you can do is to just add the corresponding css for the class names which are automatically generated by wordpress:
.current-menu-item {
color: red; // change the color of the current active page to #red;
}
.current-menu-parent {
// current active menu's parent styles
}
You don’t need to use jQuery.