Adding removing input fields using jQuery

Adding removing input fields using jQuery

My code:
https://codepen.io/juscelinobarao/pen/MrxMNz


I'm having trouble deleting the new inputs created using jQuery.
I do not know what to do for the code below to eliminate the correct div.

$ (wrapper) .on ("click", "delete", function (e) {
e.preventDefault (); $ (this) .parent ('div'). remove (); x--;


Can someone help me?


--
Atenciosamente
Juscelino Barão