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

100
Vistas
How to bind 2 input fields dynamically added in a table with Jquery

I am not very familiar with javascript/Jquery Syntax, I would like to bind 2 input text fields that were dynamically added to a table inside a loop. The main goal is to automatically fill the second text field with text from the first one. I was able to do it for 2 static text field by doing that.

$(document).bind('input', '#changeReviewer', function () {
    var stt = $('#changeReviewer').val();
    stt = stt.replace(/ /g,'.')
   $("#changeReviewerEmail").val(stt + "@@xxxxxx.com");
});

I have tried a few things but when I try to get the value of the first input, it always returns empty. Thanks.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Check this code

$(document).on('input', '#changeReviewer', function() {
  var stt = $('#changeReviewer').val();
  stt = stt.replace(/ /g, '.');

  $("#changeReviewerEmail").val(stt + "@@xxxxxx.com");
});


$('#addbtn').click(function() {
  $('div').empty().append(`<input id='changeReviewer'><input id='changeReviewerEmail'>`);

});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<div>
  <button id='addbtn'>add inputs</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