Bootstrap 3 and open issue

I try to fix an error but can not detect it. How to manage

<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" >Contact Us <b class=""></b></a>
</li>

When I click link it will show up aria-expanded=“false”. Need help. It should be added OPEN:

<li class="dropdown open">

Are you trying to do something like this:

I’ve made it as simple as possible.

Thank you for the message. It strange as your code is the same as my code. Which element causes an issue as I have double checked.

dropdown-toggle element added open element. In your case it is one element upper level: <li class="dropdown">

Also, it is an issue as aria-expanded=“false” will never be aria-expanded=“true”

How is this possible? Is it Bootstrap issue and some commands or missing Bootstrap JavaScript?

Ill need to see a demo of your page to work exactly what’s going on.

You do need to follow the method used in my example as the js looks for that structure and toggles everything accordingly.

In my example you can see from devtools that the aria-expanded attribute is toggled by the js as required.

There must be something different in your code.

I guess it needs testing. Your code works but there is some conflict inside JavaScript.

If you can give me a link to the problem page I’m sure we can sort it quite quickly.:slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.