Demo of changing font color after counting text using JQuery





HTML


<textarea id=d1 rows=3 cols=80 name=d1></textarea>
<div id=d2></div>

jquery


<script>
$("#d1").keyup(function(){
var count = $("#d1").val().length;
if (count>=15){
$( "#d1" ).animate({ color: "rgb( 250, 20, 120 )"},1);
}else{
$( "#d1" ).animate({ color: "rgb( 0, 0, 0 )"},1);
}
$('#d2').html(count);
});
})
</script>