jquery-simply-countable icon indicating copy to clipboard operation
jquery-simply-countable copied to clipboard

How to get counter to reset after submit (ajax)

Open sincero opened this issue 12 years ago • 2 comments

I have a form thats submitted with ajax, and the counter shows the remaining characters (if any) and won't update until a user starts typing again. Any way to reset the count on submit?

sincero avatar Jun 24 '12 11:06 sincero

At the moment no, you'll have to manually manipulate the counter with jQuery on your submit method:

$('.your-counter').text(0);

Although there should probably be a better way. I'll leave this open as a possible feature.

aaronrussell avatar Jun 25 '12 18:06 aaronrussell

hey thanks! This works like a charm. this will do the job :) For others wondering, just set the text number to the max amount of characters you allowed.

sincero avatar Jun 28 '12 07:06 sincero