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

157
Visualizações
How to append a bootstrap dropdown with a div based on ID?

In my angular, I have a dropdown component. Here is how it looks like:

<div dropdown  placement="bottom left" #dropdown="bs-dropdown" [autoClose]="true" 
  [insideClick]="true" [container]="body">
  <a class="templates-icon" dropdownToggle (click)="toggleTextTemplates();">
    <i #one class="ic-text-templates" aria-hidden="true"></i>
  </a>
  <ng-container *ngIf="toggle" >
    <div *dropdownMenu class="templates-container dropdown-menu"
    role="menu" aria-labelledby="button-basic">      
  </ng-container>
</div>

Here in this example, container attribute is set to body and therefore the dropdown is bind with the body and visible top of each element.

Now let say I have three layer in my app. Layer-one, layer-two and layer-three and they are top of each other. Now I would like to display the dropdown only on layer-two (or imagine in middle layer). So I would like to bind this dropdown with layer-two based on id, so that drodown will be visible on top of layer one and two, but not the layer three:

<div id="layer-one"> 
  some element 1
  <div id="layer-two"> 
    some element 2
    <div id="layer-three"> some element 3</div>
  </div>
</div>

Can someone please give me an idea, or solution how I can achieve that?

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

0

Have you tried to just place the dropdown at layer 2? otherwise you can can use javascript like: getElementByID('#33').innerhtml

or make CSS index rules, where there is a attribute called index: (-1) or (1) etc. for the placement of the dropdown

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