I'm trying to add list items with links and when i'm trying to remove them nothing happens. But if i create the li items in my HTML they do get removed..
My append code-
fileInput.append('<li><span>' + fileurl + '</span><a><img src="/remove-slide.png" /></a></li>');
My remove code-
jQuery('li a').click(function() {
jQuery(this).parent('li').remove();
});
When i use the same append code as static HTML, i can remove it without a problem. But when i add these lines using append nothing happens. How can i fix this please? :)