One solution I've used in the past is to create a simple front controller for all your server-side ajax handling and a simple function for client-side.
A very simplified version might look something like:
ajax.php
if (isset($_POST['controller'] && isset($_POST['action'])) {
$controller = $_POST['controller'];
$action = $_POST['action'];
$c = new $controller;
$c->$action();
}
Then in jQuery you just use something like....
function ajax(controller, action, callback) {
$.ajax({
url: "/ajax.php",
method: 'post',
data: {
controller: controller,
action: action
},
success: callback
});
}
ajax('foo','bar');
Of course if you need more flexability you need to be able to expose more than just a simple function.