I'm cannot return data from $.post to function() pls help
refer url : Data from post request
test = {
getData : function (callback){
$.post("getdata.php",{data: data},function(data){
callback(data);
}
}
}
var data = test.getData(callback);
console.log(data);
** TypeError : callback is not a function
thank you