It looks like you're querying with JQuery too soon. You haven't yet appended it to the DOM when you're trying to add the submit method to it.
Oh, I didn't think about that. I ended up by creating that form directly in html and query with jQuery. Now it's fine :). Thank you for the answer.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.