Adds the condition to display the active class in subNav.