Word limit on user biography changes

This commit is contained in:
Ana 2016-04-27 00:21:39 +02:00
parent e082e7599d
commit 22916971c7
2 changed files with 16 additions and 4 deletions

View file

@ -1,5 +1,17 @@
$(function () {
/**
* Show the number of words in the biography text field when opening the
* profile edit page
*/
$(document).ready(function(){
word_count($("#user_biography")[0], 'bio_length', 150);
});
/**
* Update the number of words in the biography text field every time the user
* releases a key on the keyboard
*/
$("#user_biography").bind('keyup', function() {
word_count(this, 'bio_length', 150);
} );