title: Calling a class method with jQuery AJAX?
body: <p>I am moving from the PHP AJAX library xajax to jQuery AJAX.</p>
  
  <p>With xajax, I could contain all my AJAX calls inside class methods by binding public class methods to javascript function names (eg. $this->registerFunction('javascriptFunctionName', &amp;$this, 'classMethodName')).</p>
  
  <p>I am hoping there is a way I can do something similar with jQuery AJAX, whereby I can do something like this:</p>
  
  <pre><code>$('#myButton').click(function() {
      $.get('class|methodName',
      {
        parameter: value
      },
      function(data) {
        if (data) {
          ...
        }
        else {
          ...
        }
      });
  
      return false;
    });
  });
  </code></pre>
  
  <p>I know you can AJAX calls to MVC controller methods, but unfortunately my legacy product doesn't use MVC :-(</p>
  
  <p>Please tell me there is a way?</p>
  
  <p>If not, is there a way to map a call to a global PHP function?</p>