Jquery username check
<p>I'm using this Jquery function for available username check.</p>

<p>How can I fire this Jquery function only if the username field is greater of 5 characters? </p>

<p>Jquery looks like:</p>

<pre><code>$(document).ready(function() {
$('#usernameLoading').hide();
$('#username').blur(function(){
$('#usernameLoading').show();

$.post("usercheck.php", {
un: $('#username').val()
}, function(response){
$('#usernameResult').fadeOut();
setTimeout("finishAjax('usernameResult', '"+escape(response)+"')", 400);
});
return false;
});
});

function finishAjax(id, response) {
$('#usernameLoading').hide();
$('#'+id).html(unescape(response));
$('#'+id).fadeIn();
} //finishAjax
</code></pre>

<p>Can I use something like this and how:</p>

<pre><code>var usr = $("#username").val();
if(usr.length &gt;= 5)
{   
}
</code></pre>
