I have this JQuery code to limit text in a textarea to 250 characters:
$('#postform textarea').keypress(function() {
if($(this).val().length >= 250) {
$(this).val($(this).val().slice(0, 250));
return false;
}
});
Is it possible to change this code so users can type past the limit in the textarea, then when the user clicks the submit button it shows an alert if it is over the limit.
Any help appreciated.