0
Is it possible to load a specific method from an ajax ? I’ll give you an example:
var actions = {
options : {
action : "newPost" ,
dados : {
title : "Novo Post" ,
content : "Conteúdo" ,
author : "Autor"
}
},
init : function() {
var _this = this;
$.ajax({
url : "action.php" ,
method : "POST" ,
dataType : "json" ,
date : _this.action ,
success : function(action){
console.log(action);
}
});
}
}
action.init();
class Action{
public $_action;
public newPost($title , $content , $user){
}
}