Replaced form.submit() with form.on('submit') to be more jQlite-friendly