Have a look at this topic and particularly this answer (if you want to set the active class dynamically).
active