yii2 dropdown navbar

Hi, 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? (Sr for my English).

What do you mean with "active class"?