JQuery Input complete?

$(function(){
var passwordLength = $('#penewpass').val().length;
if(passwordLength == 0){
$('#penewpass').next('.error').css('display', 'inline');
$('#penewpass').change(function(){ $(this).next('.error').css('display', 'none');
});
}
});