JQuery callback to previously defined function
<p>I'm still learning JQuery (and as a result a little JavaScript) but I can't seem to find out how to use a previously defined function in a callback.</p>

<p>Say I have:</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {

function ajax_start() {
                      alert("starting...");
                      }

});
&lt;/script&gt;
</code></pre>

<p>And I wish to use this in another function e.g:</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {

$.ajax({
        beforeSend: ajax_start(),
        url: "insert_part.php",
        type:"POST",
        data: "customer="+customer
  });
});
&lt;/script&gt;
</code></pre>

<p>Would this be correct? (I assume not as it doesn't...) what is the proper way of doing a callback?</p>
