Feb 28, 2011

Text Limit Validation JQuery

Here is a very simple script which allows you to plug-n-play the code for putting a client end text limiter.

Here are the following steps:
Usage 1
  • Download the minified js
  • Write HTML - <textarea></textarea>
  • Write JS - $('textarea').textLimit(100)
Usage 2
  • Download the minified js
  • Write HTML -
    <textarea></textarea>
    <span></span>
    <textarea></textarea>
    <span></span>
  • Write JS -
    $('textarea').textLimit(100,function( length, limit ){
    $(this).next().text( limit - length );
    });
VIEW DEMO

No comments:

Post a Comment

Test post after a long time

i want to see the post