I'm currently testing on something fairly simple. In my project you can add a listitem via a form and delete it immediately in an updated list. In the beginning of the file I bind the delete click handler:
I would think that all elements with class "delete" can be removed before or after an Ajax call. So when I add a new listitem with class "delete", I try to click it but it doesn't enter the function. Older items do.
The delete function:
PanelRoadtrip.prototype.deleteListitem = function(e)
this.listId = $(event.currentTarget).parent().parent().attr("id");
this.listItemValue = $(event.currentTarget).parent().text().split(" delete");
url: Util.api + "/roadtrip/delete/" + this.tripId + "/" + this.listId + "/" + this.listItemValue,
Does someone has a simple solution for this problem, searched on Stackoverflow, but found nothing that works.
Thanks in advance
以上就是Click not detected after Ajax Callback的详细内容，更多请关注web前端其它相关文章！