Dropdown button does not work

Asked

Viewed 310 times

0

Dropdown button does not work, keeps appearing the # up there but it won’t open.

Can someone please help me?

<!DOCTYPE HTML>
<html lang="en-US">
<head>

<meta charset="UTF-8">
<meta name="description" content="menu"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>estocaki</title>

<script language="JavaScript" src="script/jquery.js" type="text/javascript"></script>

<script language="JavaScript" src="script/maskedinput.js" type="text/javascript"></script>


<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.css" />
<link rel="stylesheet" href="css.css" />


</head>
<body>
    <div >
        <img src="img/Estocaki.jpg" class="img-responsive" alt="Cinque Terre">
    </div>
    <hr />
    <div class="container-fluid" >
    <div class="row-fluid">
        <div id="menu" class="span12 ">
            <ul class="nav nav-tabs ">
                <li role="presentation" ><a href="menu.php">Home</a></li>

                <li role="presentation" class="dropdown" >
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Cadastrar<span class="caret"></span>
                </a>
                    <ul class="dropdown-menu">
                        <li><a href="cad-produto.php">Cadastro de Produtos</a></li>
                        <li><a href="cad-forn.php">Cadastro de Fornecedores</a></li>
                    </ul>       

                </li>

                <li role="presentation"><a href="#">Cadastrar Categoria e Un. de Medida</a></li>
                <li role="presentation"><a href="#">Cadastro de Entrada</a></li>
                <li role="presentation"><a href="#">Cadastro de Saída</a></li>

                <li role="presentation" class="dropdown" >
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Relatórios<span class="caret"></span>
                </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Relatório de Entrada</a></li>
                    </ul>       

                </li>

                <li role="presentation"><a href="#">Lista de Fornecedores</a></li>
                <li role="presentation"><a href="login.php">Sair</a></li>
            </ul>
        </div>
    </div>
</div>

  • 1

    Your code is incomplete, CSS and JAVASCRIPT are missing

1 answer

1

I noticed you’re using a menu from bootstrap and in that case it is necessary that the javascript that library is also inserted.

Below the call of jquery call the bootstrap, Keep it up as it will be:

<script language="JavaScript" src="script/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="bootstrap/js/bootstrap.min.js"></script>

It is necessary that the file script/jquery.js and the bootstrap/js/bootstrap.min.js exists in the folder, so check.

Always when you have these problems check if the file paths are correct and if there is no Javascript error in the browser console.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.