I need to access helper class function through ajax request.
In JS file :-
var sbfootscores = {};
(function($){
sbfootscores.getTeams = function(competition_id){
$.ajax({
url:'',
type:"POST",
data:{com_id:competition_id},
success: function (data) {
console.log(data);
}
});
}
})(jQuery)
In helper Class:-
public static function getTeams(){
//i need to access this function
}
What url to put in ajax's options url??
Any Help will be appreciated.