title: How do I pass a variable to a ajax success function as it was at the time of the ajax call?
body: <p>So this is my ajax call (pretty much standard jQuery but using the couchdb jquery library, <a href="http://daleharvey.github.com/jquery.couch.js/" rel="nofollow">http://daleharvey.github.com/jquery.couch.js/</a> ):</p>
  
  <pre><code>var stuff = "some stuff";
  $.couch.db("test_db").create({
      success: enyo.bind(this, function (data) {
          console.log(stuff);
      })
  });
  stuff = "a change in stuff";
  </code></pre>
  
  <p>And I'd like the output of console.log to be "some stuff" rather then "a change in stuff".</p>
  
  <p>The more methods to do this the better, cause I think some methods might need me to not use "enyo.bind" ( <a href="http://enyojs.com/" rel="nofollow">http://enyojs.com/</a> ), but perhaps I can accomplish the same thing a little differently with those methods.</p>