Down navigation bar yii2

I want to make a dropdown but show by hover not by click but look like its impossible with navbar widget. So, I decided to not use it. The question is how can I change active class when I click on each list item? Any solution?