“Como descobrir se está vazio ou não usando jQuery” Respostas de código

jQuery se nulo ou vazio

if (jQuery('#something').val().length != ''){}
or
if (jQuery('#something').val().length != 0){}
Fine Finch

Como descobrir se está vazio ou não usando jQuery

if ($('div.element').is(':empty')) {
    alert('is empty');
}
else {
    alert('not empty');
}
Poised Porpoise

Respostas semelhantes a “Como descobrir se está vazio ou não usando jQuery”

Perguntas semelhantes a “Como descobrir se está vazio ou não usando jQuery”

Mais respostas relacionadas para “Como descobrir se está vazio ou não usando jQuery” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código