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

219
Vistas
I'm trying to create two unordered list section within an unordered list, so that there are two dropdown menu

I want to create a Unordered List Section with 9 list items. The fist Li items contains an inner Unordered List. The fifth Li item also contain an inner Unordered List. The Li items containing inner UL have "-" and "+" sign respectively, when we mouseover these sign they switch and opens the inner UL

Here is the image Showing the UL section that i want to create enter image description here

Also there is link for reference to show how the UL section work for better understanding Reference Link

Can anybody help me with recreating this section using HTML, CSS & JavaScript only

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You have a really good reference to work with. You can see how it works by inspecting the code.

The reference has a ul inside a ul which is set to display:none and changes it to block on hover.

Here's a simple demo where the list expands on click.

const expand = () => {
    const list = document.querySelector('.innerList');
  list.classList.toggle('show');
}
li {
  list-style: none;
}

.innerList {
  padding: 0;
  display: none;
}

.show {
  display: block
}
<ul>
  <li>one</li>
  <li>one</li>
  <li>
    one
    <button class='btn' onclick="expand()">+</button>
    <ul class='innerList'>
      <li>a</li>
      <li>a</li>
      <li>a</li>
      <li>a</li>
    </ul>
  </li>
  <li>one</li>
  <li>one</li>
</ul>

about 4 years ago · Santiago Trujillo 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