How do I check if there's any content in <textarea> ? I need to addClass based on that condition.
Many thanks
How do I check if there's any content in <textarea> ? I need to addClass based on that condition.
Many thanks
if($.trim($('textarea').val()).length){
$(this).addClass('someclass');
}