$(this).attr("name") not working with $.post
<p>I'm using this code on a simple form. Please can you tell me why this code works</p>

<pre><code>$(document).ready(function(){

    $(":input").focus(function() {
        $(this).keyup(function(){
            if (this.value != this.lastValue) {
                $.post("ajax-validation.php", { "username" : $(this).val() },
                function(data){
                    $("#display").html(data);
                });
                this.lastValue = this.value;
            };
        });
    });

});
</code></pre>

<p>and this not?</p>

<pre><code>$(document).ready(function(){

    $(":input").focus(function() {
        $(this).keyup(function(){
            if (this.value != this.lastValue) {
                $.post("ajax-validation.php", { $(this).attr("name") : $(this).val() },
                function(data){
                    $("#display").html(data);
                });
                this.lastValue = this.value;
            };
        });
    });

});
</code></pre>

<p>It's a very strange thing!!</p>
