1
I am developing a web application and I am using the dropdown menu of bootstrap but it does not work
My <head></head>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/bootstrap/bootstrap.min.js"></script>
    <script src="js/jquery-1.12.0.min.js" type="text/javascript"></script>
    <script src="js/jquery.maskedinput.js" type="text/javascript"></script>
    <script src="js/jquery.maskedinput.min.js" type="text/javascript"></script>
    <script src="bootstrap/bootstrap.min.js" type="text/javascript"></script>
    <script src="bootstrap/bootstrap.js" type="text/javascript"></script>
    <link rel="stylesheet" href="bootstrap/bootstrap.css">
    <link rel="stylesheet" href="css/css.css" type="text/css">
    <link rel="stylesheet" href="css/font-awesome.min.css" type="text/css"/>
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.css">
  </head>
HTML
 <div class="body-wrap" >
      <nav class="navbar navbar-inverse" role="navigation" id="azul">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
        <a class="navbar-brand" ></a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
          <div class="conteudo"><li><a href="#">PAGINA PRINCIPAL</a></li></div> 
          <div class="conteudo"> <li><a href="#">CONTATO</a></li></div>
        <li class="dropdown">
            <div class="conteudo"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">PRODUTOS <b class="caret"></b></a></div>
          <ul class="dropdown-menu">
            <li><a href="#">Camisetas</a></li>
             <li class="divider"></li>
            <li><a href="#">Calças</a></li>
             <li class="divider"></li>
            <li><a href="#">Bermudas</a></li>
          </ul>
        </li>
      </ul>
    </div>
    <!-- /.navbar-collapse -->
  </div>
  <!-- /.container-fluid -->
</nav>
 </div>
JS
$('ul.nav li.dropdown').hover(function() {
 $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
 }, function() {
  $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
 });
Why be creating an element
scriptpassing as attribute a fileCSS?– NoobSaibot
I changed Wéllingthon had put the wrong code
– User1999
See what’s returning on
console– NoobSaibot
bootstrap.min.js Failed to load Resource: the server responded with a status of 403 (Forbidden)
– User1999
This using
Linux? This is about permissions.Forbiddenthat is to sayProibidocheck the file permissions.– NoobSaibot
I’m using windows
– User1999
Even so, check the access permissions of the directory and file, your code is messy, you are importing 2 times the
bootstraplook, you’re using acdnand importing local. It will not work, either one or the other.– NoobSaibot
then I have to configure the security of bootstrao.min.js ?
– User1999
Let’s go continue this discussion in chat.
– NoobSaibot