if($(this).val().length <= 5 || $(this).val() == defaultValue) { $(this).closest('tr').find('.status').animate({ backgroundColor: "#ff0000" }, 500 ); }