Is there a more efficient, DRYer way of writing the if-else-statement in following piece of code? It just doesn't look nice.
var $diffPaymentAddressFieldset = $('fieldset.diffPaymentAddress', 'form.myForm');
// $checkbox is an input with type=checkbox
if ($checkbox.is(':checked') === true) {
$diffPaymentAddressFieldset.removeClass('hidden');
} else {
$diffPaymentAddressFieldset.addClass('hidden');
}
(FYI: Ignore the long variable names, they'll get minified.)