[jQuery] Shorten the JQuery code

[jQuery] Shorten the JQuery code


Could someone tell me how to shorten the following code? Thanks.
if ($('.def').length == 0) {
$('#no-defs').show();
}
else {
$('#no-defs').hide();
}