[SOLVED] Problem with event listener
Hay friends the problem is with following code https://code.sololearn.com/WreZixWXD3GL Aactuly whenever the document is loaded the delete button of notes shows console correctly but when I add some new notes to it the event listner dosen't response me for second time. I know question is bit unclear. Simple see the last jquery event listener. $('div.small_delete').on('click', function(){ var del_idx = $(this).parent().parent().index(); console.log(del_idx); }); It works for the first time when the document is loaded but after that when I add some notes using add button of top right corner it dosen't work anymore. ⚠️ Sololearn doesn't support localStorage so dont try this app here paste it in any of the code editor and run it you will get my doubt.