Comprising the code of jquery validation
<p>I want to write common function for text box field. Suppose I have 3 text box. On validation time. I have wrote particular condition for all three text boxes.. like</p>

<pre><code>if( conpwd ==='' | conpwd ==='')
    {
        $('#errorconpwd').show('fast');
        $('#conpwd').focus().css({'background-color':'#FFC'});
        return false;
        }   

    if( fname ==='' | fname === null)
    {
        $('#errorfname').show('fast');
        $('#fname').focus().css({'background-color':'#FFC'});
        return false;
        }   

    if( lname ==='' | lname === null)
    {
        $('#errorlname').show('fast');
        $('#lname').focus().css({'background-color':'#FFC'});
        return false;
        }   
</code></pre>

<p>like here if confirmation password field is blank. I have focus it with css property, for fname again i have written n again for last name. now if first name is focused and user enter some text than i want to again make css default. I mean to say instead of writing </p>

<pre><code>$('#fname').blur(function(){
   if($('#fname').val()!=''){
     $('#fname').css({'background-color':'#FFF'});
    }
 }   
</code></pre>

<p>Means I want to write combine condition for all. I don't want to write separately for each field. Similary can I comprise above written code for confirmationpassword, fname, lname in one go?</p>

<p>As per my search on google. I want to modify it with $(this) selector..</p>
