Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

612
Vistas
How to make the nav bar in all your pages without having to rewrite the code in each page separately

I designed a home page with a nav bar to reach for all website pages and now I wanna make this nav bar available on all pages So How can I do this without the need for re-designed this nav bar in all pages from the beginning

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If its a regular html , css , js website you could use insertAdjacentHtml method

First make a scripts.js file.

var navbarItems = `<ul>
                     <li>Home</li>
                     <li>About</li>
                     <li>Contact</li> 
                   </ul>
`
document.body.insertAdjacentHTML("afterbegin", navbarItems);

and then in every html file where you want the navbar, import that script.js file using script tag

 <body>
    
    
    <script src="src/script.js"></script>
  </body>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda