Accessing $(this) within a callback function
<p>I'm working on changing prompt() to jPrompt() since IE blocks prompt() from running.  The problem is $(this) no longer works correctly because jPrompt() doesn't return a value, but uses a callback function.</p>

<p>So lets say I have something like this, which works:</p>

<pre><code>$("a.foo").click(function(){
    $(this).text(prompt("Type Something",""));
}
</code></pre>

<p>When I convert it to this it breaks:</p>

<pre><code>$("a.foo").click(function(){
    jPrompt("Type something:","","", function(r) {
        $(this).text(r);
    }
}
</code></pre>

<p>How do I access $(this) properly?</p>
