Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <title>Title</title>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- Bootstrap CSS v5.3.0 -->
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM"
- crossorigin="anonymous">
- </head>
- <body>
- <nav class="navbar navbar-expand-lg text-bg-warning" >
- <button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navBar">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navBar">
- <ul class="navbar-nav">
- <li class="nav-item"> <a href="#" class="nav-link">Home</a> </li>
- <li class="nav-item"> <a href="#" class="nav-link">File</a> </li>
- <li class="nav-item"> <a href="yt_05_menu.html" class="nav-link">Modifica</a> </li>
- <li class="nav-item"> <a href="#" class="nav-link">Strumenti</a> </li>
- <li class="nav-item"> <a href="#" class="nav-link">Contatti</a> </li>
- </ul>
- </div>
- </nav>
- <!-- Bootstrap JavaScript Libraries -->
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
- integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
- crossorigin="anonymous"></script>
- <script>
- const pagina = document.URL.substring(document.URL.lastIndexOf('/')+1);
- const link_da_attivare = document.querySelector("a[href='"+pagina+"']");
- link_da_attivare.classList.add("active");
- </script
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement