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

199
Visualizações
hide second dropdown untill first one not selected(Refreshing issue)
hi i have two dropdown dynamic one . my question is when i load my chrome page/refresh the page all the dropdown value are visible without selecting first dropdown option value

 <script>

/* code for :select scheme, relative to department shown */

        $('#department').on('change', function () {  
         
            var departments = $('option:selected', this).attr('attr');
            $("#schemes option").each(function (i) {
                if ($(this).attr('subattr') == departments) {
                    $(this).css({ display: "block" });
                }
                else {
                    $(this).css({ display: "none" });
                }
            });
        });
    </script> // this is the script for both the dropdown department is first dropdown id and schemes is second dropdown id //

note:
all the dynamic option are working well like when i select in first dropdown ,related to his values are shown but when i refresh page and i select second dropdown all values are shown in dropdown without selected first dropdown and I am not excessing according to selected option in both the dropdown when i refresh the page

thank you in advance I am not able to get answer please help me

about 4 years ago · Juan Pablo Isaza
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