+ 3

Simple Web Sticky Note, notes wont remove when x is clicked

Hi I have code to create simple Web Sticky Note with feature: 1) Add note 2) edit note 3) delete note Here's the Code (it's not eye catching, just simple notes): https://code.sololearn.com/W31mGNT4b6dp if i precoded the note, as i stated in in my code, the remove function work well. But if i create the note from the add note function, it wont get removed after x is clicked. I'm a bit confused of what's happening, so i appreciate the help if you can find the problem for me. Thx

12th Oct 2021, 2:03 AM
M.O.HONOR - avatar
1 Answer
+ 1
When you set event listener for closening buton, you have only one inside DOM, and only this one can be selected and closed, but when you make new one, you need to add event listener to this too. So i just copy-paste this code and place it inside code where you end with creation of note. https://code.sololearn.com/W4Pi5uEmPFn5/?ref=app
12th Oct 2021, 8:52 AM
PanicS - avatar