title: How to write a jQuery function with a callback?
body: <p>I have the following function:</p>
  
  <pre><code>function loadProjects(pID) {
  
      $.ajax({
          url: myURL,
          success: function (dataJS) {XXXXXXXXXXXXXXXX}
      });
  }
  </code></pre>
  
  <p>I call this function like so loadProjects(1);</p>
  
  <p>Issue is I want to be able to define a callBack function after success, and I'd like to include it when I do loadProjects(1, callback:{whatever js is included here gets called back after success})</p>
  
  <p>How can I have a function accept a callback?
  How can I pass a callback to that function?</p>
  
  <p>Thanks</p>