How would I, using $.post() in a function, force the return on the post callback?
Example:
function myFunction(){
$.post(postURL,mydata,function(data){
return data;
});
}
I have tried playing around with it using .done() and .queue() however neither has worked for me. I understand there is a fundamental flaw in my example; with that said, how can I achieve my desired functionality?