class EntityForm { constructor() { $("#create-location").on("change", event => { const checked = event.currentTarget.checked; $("#contact-section").prop("hidden", !checked); }); } } $(() => new EntityForm());