Toggle containers with show and hide. I have two grid containers with the class damage and no_damage and want them to show and hide with a toggle:
fd.spRendered(function () {
const t = fd.field('Damage');
function apply() {
const on = t.value === true;
fd.$('.no_damage').toggle(!on);
fd.$('.damage').toggle(on);
}
apply();
t.$on('change', apply);
});
Somehow it does not work