Jump to content

Dropdown menu only works a fixed number of times


Recommended Posts

Hello!

I am trying to modify the header of a classic theme of prestashop 1.7, I want to use the dropdown link classes of bootstrap, but my code only shows and hides the menus a fixed number of time, in my case I had two dropdowns and everything works fine just two times.

I tried to make this using the onlick function and mouseup and toucheend events, i.e. from scratch not using bootstrap but happens the same thing. Is like some js were limiting these events.

when I click on this item the class open and area-expand get the right values. As you see bellow

<li class="nav-item dropdown open">
	<a class="nav-link" href="#" id="customer_signinDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">    
    	<i class="fa fa-cog fa-lg">&nbsp;Menu Title 1</i>
    </a>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="customer_signinDropdownMenuLink">
        <a class="dropdown-item" href="http://localhost/rodu/es/?mylogout=" rel="nofollow">Cerrar sesión</a>
        <a class="dropdown-item" href="http://localhost/rodu/es/mi-cuenta" rel="nofollow"><span>dg dgf</span></a>
    </div>
</li>

when I clic the other the same

<li class="nav-item dropdown open">
	<a class="" href="#" id="lang_selectorDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span class="text-nowrap">ES <span class="fa fa-caret-down"></span></span>
    </a>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="lang_selectorDropdownMenuLink">
                	                      <a href="http://localhost/rodu/es/carrito?action=show" class="dropdown-item lang-current" data-iso-code="es">Español</a>
                                          <a href="http://localhost/rodu/it/carrello?action=show" class="dropdown-item" data-iso-code="it">Italiano</a>
                        </div>
</li>

but when I clic again the other menu nothing happens

 

<li class="nav-item dropdown">
	<a class="nav-link" href="#" id="customer_signinDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">    
    	<i class="fa fa-cog fa-lg">&nbsp;Menu Title 1</i>
    </a>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="customer_signinDropdownMenuLink">
        <a class="dropdown-item" href="http://localhost/rodu/es/?mylogout=" rel="nofollow">Cerrar sesión</a>
        <a class="dropdown-item" href="http://localhost/rodu/es/mi-cuenta" rel="nofollow"><span>dg dgf</span></a>
    </div>
</li>

Can any one tell me something?

 

Best Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...