0

Fiz um layout no qual pretendo colocar um navbar onde desejo colocar um dropdown, porém o menu do dropdown não aparece, só fica o botão lá... Já tentei colocar Jquery mas não funcionou, segue a página:

<!DOCTYPE html>

@yield('titulo', 'PetShop do Amigão')

<link rel="stylesheet" href="js/app.js">
<link rel="stylesheet" href="css/app.css">

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <a class="navbar-brand" href="/PetShop/public">PetShop do Amigão</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">

    <ul class="navbar-nav mr-auto">
      <li class="nav-item active">
        <a class="nav-link" href="/PetShop/public">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Rações</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Coleiras</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Remédios</a>
      </li>
    </ul>

    <ul class="navbar-nav navbar-right">
      <li class="nav-item dropdown">
         <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
           Olá, Usuário
         </a>
         <div class="dropdown-menu" aria-labelledby="navbarDropdown">
           <a class="dropdown-item" href="#">Minha Conta</a>
           <a class="dropdown-item" href="#">Meu Carrinho</a>
           <a class="dropdown-item" href="#">Sair</a>
         </div>
     </li>
  </ul>

</div>

@yield('conteudo')

1 Resposta 1

0

CONFIRA AÌ SE DA CERTO

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>@yield('titulo', 'PetShop do Amigão')</title>
    <style media="screen"> </style>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

  </head>

  <body>

    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
      <a class="navbar-brand" href="/PetShop/public">PetShop do Amigão</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <div class="collapse navbar-collapse" id="navbarSupportedContent">

        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="/PetShop/public">Home <span class="sr-only">(current)</span></a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Rações</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Coleiras</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="#">Remédios</a>
          </li>
        </ul>

        <ul class="navbar-nav navbar-right">
          <li class="nav-item dropdown">
             <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
               Olá, Usuário
             </a>
             <div class="dropdown-menu" aria-labelledby="navbarDropdown">
               <a class="dropdown-item" href="#">Minha Conta</a>
               <a class="dropdown-item" href="#">Meu Carrinho</a>
               <a class="dropdown-item" href="#">Sair</a>
             </div>
         </li>
      </ul>

    </div>
</nav>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  @yield('conteudo')
</body>




</html>

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .