Here's my function which returns a name of a person.
function getName(ID){
return $.ajax({
url:url,
data: ID,
type: 'get',
dataType: 'json'
});
}
And here is where I am attempting to use the .done() function.
getName("1").done() // How do I ref the returned var in our done function?
I am confused on how to reference the returned value from my getName function within my done function.
I know I could do this using success: within the .ajax, but I am trying to move away from that and used deferred objects.
Thanks!