Something to consider is every time you use $('selector') you're reaching into the DOM, similar to doing a database query. Instead, consider caching the result by extracting a function to retrieve the element in the dom:

```
TabHelper.optionalFields() {
  this.optionalFieldsElement = this.optionalFieldsElement || $('#optional_fields');
  return this.optionalFieldsElement;
}
```

This means that you'll keep a reference to the optional_fields element in memory so as you modify it with javascript (calling show or hide) it will update without first looking for the element in the DOM.