1

I am cloning dom with jQuery append. Then I check the input value. The change and keyup functions do not work. But the input I created with jQuery append is not perceived. Can you help with this ?

Html

    $(".email-address").on('change keyup', function (e) {
        alert("test");    
    });

jQuery

    $('.add-extra-email-button').click(function() {
        var newDiv = $('<div class="clone_edilen_email"></div>');

        newDiv.html('<div class="form-group"><input type="email" class="form-control email-address" name="email[]" placeholder="E-Mail"></div>');

        $('.clone').append(newDiv);
    });
Dodiş
  • 467
  • 4
  • 19

0 Answers0