2👍
✅
You’re probably running that code in a form’s submit event without cancelling the submit.
Therefore, the browser is submitting the form and navigating to that page.
Add return false
.
Source:stackexchange.com
2👍
You’re probably running that code in a form’s submit event without cancelling the submit.
Therefore, the browser is submitting the form and navigating to that page.
Add return false
.