darrentaytay / jquery-character-counter

A simple, Twitter style character counter for HTML input fields.
51 stars 31 forks source link

Doesn't work on input field #4

Closed SiteSplat closed 10 years ago

SiteSplat commented 10 years ago

Hi, Not sure if this is a bug or simply never implemented. This plugin doesn't work on input fileds. Is there solution/hack to allow me to use it on input fields as well? Thanks a lot.

darrentaytay commented 10 years ago

@SiteSplat it should work fine on input fields. What happens for you?

Edit: I've added an example on Input fields to "examples.html".

SiteSplat commented 10 years ago

It only works on the textarea. When I use the input I need to hit refresh to show the char counted. I'm not sure where the issue is.

This is what I use to call it:

head.ready(function () { // do something $(".Message").characterCounter({ counterFormat: '%1 characters remaining.', limit: '{MESSAGE_LNGTH}', }); });

Any suggestions?

darrentaytay commented 10 years ago

@SiteSplat, code looks fine mate - not sure what the issue could be and it's difficult to debug without being able to reproduce it.

darrentaytay commented 10 years ago

Closing this as I can't replicate it.