Update active class in menu logic