JavaScript: Creating a character counter with jQuery