title: Passing variables through to AJAX
body: <p>I have some variables that I would like to pass into an AJAX call:</p>
  
  <p>e.g.</p>
  
  <pre><code>var moo = "cow noise";
  
  $.ajax({
      type: "POST",
      url: "",
      data: "",
      success: function(data){
              //return the variable here
              alert(moo);
      }
  });
  </code></pre>
  
  <p>However, <code>moo</code> comes back undefined.</p>
  
  <p><em>note</em>, I've left <code>url</code> and <code>data</code> empty on purpose - they are populated in my code.</p>