Created
June 20, 2018 07:18
-
-
Save webinmd/0c06ccbd8cb91311a45836fc4e39d2fc to your computer and use it in GitHub Desktop.
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 name="message" data-max="50" ></textarea> | |
$('.symbol-count').keyup(function () { | |
var max = $(this).data('max'); | |
var len = $(this).val().length; | |
$(this).closest('form').find('.symbol-count').find('span').text(len); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment