Something like this if both have to be empty
if ( !$.trim($("#title").val()) && !$.trim($("#description").val()) )
If just one empty is wrong, use
if ( !$.trim($("#title").val()) || !$.trim($("#description").val()) )
Pregunta
The question is simple, i want to trim an input text (with id title)and a textarea (with id description), how can i do? I only know how todo to the title id, but not both:
if (!$.trim($("#title)".val()))
Solución
Something like this if both have to be empty
if ( !$.trim($("#title").val()) && !$.trim($("#description").val()) )
If just one empty is wrong, use
if ( !$.trim($("#title").val()) || !$.trim($("#description").val()) )