can anyone help me figure out why the dropdown menu is not working?

0
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
        <link href="css/estilo.css" rel="stylesheet" type="text/css"/>
        <!--<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>-->
    </head>
    <body>
        <div class="container">
            <p class="text-center bg-danger">
                Lorem ipsum dolor sit amet
            </p>
        </div>

        <nav>
            <div class="container-fluid">
                <div class="navbar-header">

                    <button type="button" class="navbar-toggle collapse" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Menu de navegação</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>

                    <a href="#" class="navbar-brand">jade</a>

                </div>

                <div class="collapse navbar-collapse " id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">

                        <li><a href="#">Contacto</a></li>
                        <li><a href="#">Sobre</a></li>

                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toogle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Menu</a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Productos</a></li>
                                <li><a href="#">Categorias</a></li>
                                <li><a href="#">Tipo</a></li>
                                <li><a href="#">Sair</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>

        <script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
        <!--<script src="js/bootstrap.min.js" type="text/javascript"></script>-->
        <script src="js/script.js" type="text/javascript"></script>
        <script src="js/bootstrap.js" type="text/javascript"></script>
    </body>
</html>
    
asked by anonymous 16.10.2017 / 16:21

2 answers

0

As you clicked on the word Menu, the titles, Categories, Type, and Exit appeared. and if you click again the data is 'hidden'

<ul class="nav navbar-nav side-nav">
                <li>
                    <a href="javascript:;" data-toggle="collapse" data-target="#demo"> Menu </a>
                    <ul id="demo" class="collapse">
                        <li class="active">
                            <li><a href="#"> Categorias </a></li>
                            <li><a href="#"> Tipo </a></li>
                            <li><a href="#"> Sair </a></li>
                        </li>
                    </ul>
                </li>
</ul>
    
16.10.2017 / 17:29
0

Any mistake however simple may compromise the whole code.

In your case you missed the word data-toggle which in your code is data-toogle . It's just a the letter and two g letters in toggle .

See this error in the following line of your code:

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toogle="dropdown" ...>Menu</a>
                                             ^
                                             |
    
22.10.2017 / 06:59