Created
July 11, 2020 21:09
-
-
Save rileyrichter/f6275dc72c7608dd408823ca30b2d326 to your computer and use it in GitHub Desktop.
This file contains 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
// Show the number of characters in an input | |
// #idea is the id of the input where you want to count characters | |
$('#idea').keyup(function() { | |
// Get the # of characters that are in the input | |
var charCount = $('#idea').val().length; | |
// Write the # of characters in the input to the element with an id of #charcount | |
$('#charcount').html(charCount); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment