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

159
Vistas
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 Respuestas
Responde la pregunta

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 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