Grow your CSS skills. Land your dream job.

Javascript text counter for textarea, off by one number!?

  • # January 21, 2012 at 10:59 pm

    Howdy, so my text counter is off by one. How can i make the counter more accurate and be able to count when i hit the BACKSPACE button.

    Code:


    < !DOCTYPE html>







    Comments:





    words remaining.






    JS Fiddle Link:
    http://jsfiddle.net/john_motyl/y7qrs/1/

    Javascript / JQuery is not my strong suit so I really appreciate any feedback or advice. I watch my posts so any questions will be answered and comments will be replied to.

    Thank you.

    # January 21, 2012 at 11:52 pm

    http://jsfiddle.net/Maikel1234/SsR4G/

    # January 22, 2012 at 12:06 am

    @Maikel, thank you for that code. I see why it wasn’t counting when i would backspace.

    Again, thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".