Event listener not working after inserting html via js

Label modal is opening at first and label is being appended to parent. when i click on save button im reseting the entire label-create html so that when Add card is clicked previous label doesnt show and i think this is where the issue is, i cant figure out how to work aroud this


https://codepen.io/avinash-tallapaneni/pen/VwEGMoK
around 45th line is where the issue happens
Was this page helpful?