jquery-simply-countable
jquery-simply-countable copied to clipboard
counter doesn't update when control text is set using javascript
Currently, the counter only updates on keyup, blur, or paste events. So when you set the value using javascript, the counter doesn't change. My current workaround is to manually trigger a "blur" event after setting the value....
$('#myTextarea').val("some text"); // counter doesn't update $('#myTextarea'),blur(); // make counter recognize text change
I'm not sure if there's an easy solution to this issue that will work with all browsers, but I think it should be a future enhancement if it is possible.