1Neither of the answers here helped me.
2The problem was: I was using the slim build of jQuery, which had some things removed, ajax being one of them.
3
4The solution: Just download the regular (compressed or not) version of jQuery and include it in your project.