Guest User

Untitled

a guest
Jul 17th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function countRemainingCharacters(){
  2. var textLength = $(this).val().length;
  3.  
  4. if (textLength > 140)
  5. $(this).attr('readonly', 'readonly');
  6. else
  7. $(this).attr('readonly', null);
  8.  
  9. $("#numberOfCharactersLeftInTextbox").text(140 - textLength);
  10. }
Add Comment
Please, Sign In to add comment