JavaScript onclick() posting twice (Bug)

How to fix jQuery onclick function() posting back twice

I was working on a project that needed every thumbnail clicked to emit a click event to a javascript file, but the problem was that one of the click events was getting attached twice to the DOM. 


Please Login to see the rest of the answer
Answer:

How I solved this was to type return false in every click function that was getting attached twice to the DOM. Problem solved.

Write an Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy