Firstly, here's my example code:
$.post( "test.php", { testdata : "signal" },
function( data ) { alert( "Nested function" )})
.done( function () { alert( "Done function" )});
I'm trying to get .done
to accomplish some stuff for me, it doesn't matter what. It won't fire, regardless of whether or not I nest a function directly in the $.post
parameters. Checking the console on Chrome shows that it's throwing an error of Uncaught TypeError: undefined is not a function
Playing around with lines and the error report shows me that it's definitely the .done
that's throwing the error, and that simply moving the .done
to directly after $.post
's close paren isn't effective.
There is another similar question that I saw, but it was for $.ajax, and I've attempted to implement the chaining they suggest, as above, to no effect. What am I missing?
EDIT: jQuery version is 1.4.4, the .post successfully returns data, and .always also fails.