I\'m not very familiar with jQuery. I\'m trying to make a form that is submitted in the background without reloading page.
I have a hidden div which shows and hides
Rather than bind to the click event (input[type=submit]) you should bind to the submit event for the form.
$("form").on("submit", function (e) {
e.preventDefault();
I'm also not sure about the validation. If it runs asynchronously, a callback is required. If it runs synchronously, when does it get triggered? It seems like it should be done when the form is submitted unless your validation plugin does that on its own:
$("form").on("submit", function (e) {
e.preventDefault();
if ($(this).validate(options)) {
$.ajax
Using e.preventDefault will prevent reload and should allow your success div to display.