Я использую Bootstrap 4.1.3 и пытаюсь выполнить навигацию с выпадающим меню.Я последовал этому примеру: https://getbootstrap.com/docs/4.1/components/navs/#using-dropdowns
Однако, это не работает.
Можете ли вы помочь мне?
Большое спасибо.
Мой код
<div>
<ul class="nav justify-content-center">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Oeuvres</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/" th:href="@{/oeuvres/}">Toutes les oeuvres</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/" th:href="@{/oeuvres/livres/}">Livres</a>
<a class="dropdown-item" href="/" th:href="@{/oeuvres/magasines/}">Magasines</a>
</div>
</li>
</ul>
</div>
РЕДАКТИРОВАТЬ 1:Файлы JS (https://getbootstrap.com/docs/4.1/getting-started/introduction/#js)
<head xmlns:th="http://www.thymeleaf.org" th:fragment="header">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" th:href="@{/css/main.css}">
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/js/main.js}"></script>
<title>Bibliothèque</title>
</head>
