This works well for the purpose. What I am looking for now are the following two functionalities:
There should be a limit of 500 characters that can be added
The button in the form should be disabled until 250 characters are
reached
I have been searching around but couldn’t find any solution so far. I hope one of the Javascript guru’s here on Sitepoint know how to adjust this function to make this happen.
One thing I would point out is that i this case it makes sense to cache your selectors, as you would otherwise be querying the DOM multiple times whenever a user presses a key.