Detecting aria-expanded state (Navbar Toggler)


#1

Hi guys,
How can I assign a new class ( using addClass ) when aria-expanded is true and when is false ?
I wanna use different classes detecting aria-expanded state ( true and false ).

This is about Navbar Toggler:
asd

Many thanks.


#2

You should listen for events fired by the Bootstrap collapse plugins
more here https://getbootstrap.com/docs/4.0/components/collapse/#events