combining a method to hide or show content
<p>I was wondering how I can combine a hide function and show function into 1 toggle Function that either fades in content or fades it out, im guessing this argument would update the fade method:</p>

<p>This is my current effort of JS using jQuery from my object but is totally wrong:</p>

<pre><code>toggleAlertOverlay: function (state) {
  var instance = this;
  if (state === hide) {
    instance.selector.fadeOut();
  }
  elseif(state === show) {
    instance.selector.fadeIn();
  }
},
toggleAlertOverlay(hide);
</code></pre>
