-1

I have an error in my code:

Uncaught TypeError: $(...).live is not a function

That code is for cloning when I click X button it should remove, but it doesn't and when I debug using F12 it gave me the error.

enter image description here

When I click the remove button the red one it would not remove

$('.remove').live('click', function(){
    $(this).parent().parent().remove();
});
<td><a class="btn btn-danger remove"><i class="fas fa-times"></i></a></td>
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Boss Pogs
  • 137
  • 1
  • 14

1 Answers1

1

This API live() has been removed in jQuery 1.9; use on() instead.

Refat Alsakka
  • 561
  • 2
  • 11
  • 1
    This answer doesn't add much value over the [duplicate target](https://stackoverflow.com/questions/14354040/jquery-1-9-live-is-not-a-function). [Try to avoid](https://stackoverflow.com/help/duplicates) answering questions that already have answers on Stack Overflow. – Ivar Feb 04 '20 at 08:54