Created
November 9, 2017 10:08
-
-
Save Bewitchedyegor/111ff4f37acd50b321d0aeb17a154620 to your computer and use it in GitHub Desktop.
Character count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('textarea').on('input', function () { | |
$(".js-countChar").fadeIn(); | |
}); | |
$('textarea').on('input', updateCount); | |
function updateCount() { | |
var cs = [150 - $(this).val().length]; | |
$('#characters').text(cs); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment