Jörn Zaefferer schrieb:
Some things I noticed:
- I manged to get a -1 count on the second textarea, mostly by typing
wildly in it
- if(typeof(nr) == undefined) { nr = 0; } - that line seems to define
a global variable if it isn't set yet, why not just using var nr = 0; ?
- I'd like to be
Hi everybody,
I recently made my first jquery plugin called textlimiter. It allows you
to limit a textarea in the same way as an input field using the
maxlength attribute. As an added bonus the plugin adds a counter which
keeps track of the amount of character left before hitting the limit set
in
TODO
- allow counter to count up instead of counting down using a parameter.
- use a parameter to set the class when hitting the limit?
- documentation for non-programmers
One thing I started doing (for Sentence type input) is allowing the user to
go past the limit with warnings and stop them
Bjorn Wijers schrieb:
Hi everybody,
I recently made my first jquery plugin called textlimiter. It allows you
to limit a textarea in the same way as an input field using the
maxlength attribute. As an added bonus the plugin adds a counter which
keeps track of the amount of character left
Just a note - if I fill up the textarea to the max the cursor jumps back to
the beginning of the textarea ( and scrolls my content back to the top ) I
don't believe this is how this should behave.
To test - type 300 characters into the first textarea. Try and place your
cursor at the end of the