Monthly Archives: July 2011

Jquery textarea maximum character limit

Simple $layout.brandtext.keyup(function(){ var maxchar=50; $(this).prev(‘div.limit’).html(($(this).val().length>=maxchar)?’cannot be greater than ‘+maxchar+’ characters’:”); $(this).val($(this).val().substr(0, maxchar)); });

Follow

Get every new post delivered to your Inbox.