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

150
Visualizações
hide second div of a particular p tag using css

I want to hide the second div after this div, there is no identifier for that div.

That's why I took this p tag attribute as an identifier. I tried using jQuery, but in page load it's sometimes visible. Is there any way to hide it permanently?

div p[data-udy-fe="text_-a91032"] {
    
}

I'm adding my jQuery code here, but when page loading we can see the div's content for some seconds. I need to hide it permanently, without the brief flash.

$("p").each(function(){        
    if($(this).attr('data-udy-fe') == 'text_-a91032') {
        $(this).next('div').next('div').hide();
    }
});
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can use + div + div selector

p[data-udy-fe="text_-a91032"]+ div + div {
  display: none;
}
<div>
  <div>Paragraph1</div>
  <div>Paragraph2</div>
  <p data-udy-fe="text_-a91032">Paragraph3</p>
  <div>Paragraph4</div>
  <div>this one is not displayed</div>
  <div>Paragraph6</div>
<div>

about 4 years ago · Juan Pablo Isaza Relatório

0

You can use the general sibling combinator to select the p tag which occurs after your specific element.

div p[data-udy-fe="text_-a91032"] ~ p {
     display: none;
}
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