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 v
You could use a closure:
$("a.foo").click( function(){ var self = this; return function() { jPrompt("Type something:", "", "", function(r) { $(self).text(r); }); } }() );