Re: Django +Ajax + jQuery problem

2020-07-03 Thread Andréas Kühne
Hi, The reason for this is that you are replacing the buttons when you update the answer. The event listener that you attached is on the first one and not the second one. You can solve this in 2 ways: 1. Reregister the event listener when you have loaded the answer again. 2. Use a different way t

Django +Ajax + jQuery problem

2020-07-02 Thread Jan Gregorczyk
My problem is that site registers only the first click on .upvote or .downvote element and ignores next ones. {% extends 'base.html' %} {% load votes_exists %} {% block title %}{{question.title|truncatechars:52}}{% endblock %} {% block content %} {{question.title}} {{question.content}} {% for answe