jQuery change callback context
<p>I am wondering how to change the context of a a jQuery callback function so that <code>this</code> is the same as it is in the parent function.</p>

<p>Take the following example:</p>

<pre><code>var context = this;
console.log(context);

element.animate(css, speed, type, function () {
     var new_context = this;
     console.log(new_context);
});
</code></pre>

<p>How would I make it so that <code>new_context</code> is equal to <code>context</code>?</p>

<p>I realise I could do this:</p>

<pre><code>var new_context = context;
</code></pre>

<p>But is there a better way of telling the function to use a different context?</p>
