Home > OS >  Bootstrap : dropdown button doesn't work anymore
Bootstrap : dropdown button doesn't work anymore

Time:12-25

I was checking one of my website when I discovered that my dropdown menus do not work anymore (don't want to collapse).

It was working perfectly some months ago. I am building this website using bootstrap and vue (I suspect something went wrong with upgrading maybe).

Here is part of my code

<p><button v-on:click="contacts = !contacts" type="button"    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-scroll-to="'#con'">Infos contact </button></p>
                <div  v-if="contacts" id="con">
                    <p><i ></i> 14, rue xxx, 92270 Bois Colombes</p>
                    <p><i ></i><a href="http://www.linkedin.com/in/xxx"> www.linkedin.com/in/xxx</a></p>
                    <p><i ></i><a href="[email protected]"> [email protected]</a></p>
                    <p><i ></i> 06 xx xx xx xx</p>
                </div>

Thank you for your help

CodePudding user response:

You use a v-on:click but why not use the standard code from dropdown from bootstrap

You can do it like this:

<div >
  <a  href="#" role="button" data-toggle="dropdown" aria-expanded="false">
    Info contact
  </a>

  <div >
    <a  href="#">14, rue xxx, 92270 Bois Colombes</a>
    <a  href="http://www.linkedin.com/in/xxx">www.linkedin.com/in/xxx</a>
    <a  href="[email protected]">[email protected]</a>
  </div>
</div>

You just have to add your icons. Also for future reference I would not add your head in your question but instead just the dropdown in the body and specificy your language used in the code block so its easier to read.

CodePudding user response:

Well i put head in purpose to let contributors check if i didn't made a mistake while calling flatly theme . It is long time ago now and i don't remember why i used a v-on:click (but it was working perfectly) . Well finally i download the bootstrap locally and i did exactly what u posted, but unfortunately now my dropdown menu don't want to deploy ..!

  • Related