Hi,
Can someone tell me why the code below doesn't work. I think my theory is sound, I am just missing some vital component.
'#tweet' is the id assigned to the form submit button. I want it to check whether the input has less than 141 characters, if it doesn't, alert the user and do not submit the form.
Currently it does nothing.
$('#tweet').click(function() {
if ($('.message').val().length > 140) {
alert('Your message much be less than or exactly 140 characters');
return false;
}
});