I get this error whether I put the jQuery $.ajax call in a $(document).ready(function() { or not. This is on a ASP.NET MVC .cshtml file.
$(document).ready(function() {
Make sure you reference JQuery first. Something along the lines of (using MS CDN):