Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

How to Count Remaining Character in jQuery with Demo

<!Doctype html>
    <title>Twitter Style Remaining Character Count using jQuery</title>
        body {
            width: 610px;

        #text-content {
            padding: 10px;
            border: #F0F0F0 1px solid;
            border-radius: 4px;
            background-color: #FFF;

        #text-content:focus {
            outline: 0;

        #character-count {
            color: #A0A0A0;
            padding: 15px 0px;
    <script src=""></script>
<textarea id="text-content" cols="70" rows="4" onKeyup="count_remaining_character()" placeholder="At least 100 character"></textarea>
<div id="character-count" align="right">150</div>
    function count_remaining_character() {
        var max_length = 100;
        var character_entered = $('#text-content').val().length;
        var character_remaining = max_length - character_entered;
        if (max_length < character_entered) {
            $('#character-count').css('color', '#FF0000');
        } else {
            $('#character-count').css('color', '#A0A0A0');

Run it yourself


Twitter Style Remaining Character Count using jQuery