Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
bootstrap JavaScript not working as in when the screen size is decreased the menu bar wont work

so I'm working with Django for the first time and I am following a tutorial, bootstrap is used for the navbar so I added the CSS from bootstrap it worked but the JavaScript from bootstrap is not working, I know that because when the screen size is reduced, a menu bar appears instead of the navbar items but it doesn't work when clicked. How can I fix this?

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CRMain</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

    
</head>

<body>
    {% include "accounts/navbar.html"%}

    {% block content %}


    {% endblock %}

    <hr>
    <h5>footer</h5>


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
        crossorigin="anonymous"></script>

</body>


</html>

2 screenshots of the before and after:- https://i.stack.imgur.com/7I5he.png https://i.stack.imgur.com/JteLC.png

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

<script> won't validate outside of the <body> or <head> tags.

<html>
  ....
  <body>
     ....
     <script type="text/javascript" src="....."></script>
  </body>
</html>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda