I just failed this audit, and I would like to understand why.
The answer is for a (9 month old) question with zero votes and low views. Additionally, there is no other answer, so this is definitely no "I want to answer a famous question to get some rep" type of answer.
Lets have a look at it:
The ajax form is repeating the post. It sends the first one, and then the second, etc. If you put an alarm() on the callback, you'll see it repeating as many times as you sent the data. A solution could be e.stopImmediatePropagation(); Read more about it in another answer.
The answer was deleted for being link only. When I look at this answer, I See:
An explanation of the problem:
The ajax form is repeating the post. It sends the first one, and then the second, etc.
Help on verification:
If you put an alarm() on the callback, you'll see it repeating as many times as you sent the data.
A possible solution:
A solution could be e.stopImmediatePropagation();
further information:
Read more about it in another answer
The linked answer however reads:
Have you tried: event.stopImmediatePropagation?
I believe it is what you are looking for:
http://api.jquery.com/event.stopImmediatePropagation/
This answer has 19 upvotes, but - as far as I can see - is even more link only than the one in question.
I would love if someone could explain to me why the one is bad while the other apparently is awesome.