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

156
Visualizações
Show/Hide fields (Conditional Logic) is not working in repeater field in php javascript

I have 3 radio buttons let's say A,B,& C. when i click on the B a new section will come having some other form fields. and most important part is that i have to append/ repeat the entire part by an add more button and the whole functionality is as previous. but in the append filed the show hide function is not working.

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

0

It is better to show a code snippet so it is easy for us to guide you. But try this code. Register the click event of the button using $(document).on('click', 'element', function);

$(function(){
 $('#btnAddMore').on('click', function(){
        $(".repeater").append($('.template').html()); 
 });
 
  $(document).on('click', '[data-containerId="alertme"]', function(){
    alert("Hello world!");  
  });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="template">
   <input type="submit" data-containerId="alertme" value="alert me" />
</div>
<div class="repeater">

</div><div>
  <button id="btnAddMore">add more</button>
</div>

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