title: The proper use of jQuery toggle?
body: <p>In this <a href="https://stackoverflow.com/questions/3337621/jquery-toggle-css">stackoverflow answer</a> </p>
  
  <pre><code>$('#user_button').toggle(function () {
      $(".hello").addClass("active");
  }, function () {
      $(".hello").removeClass("active");
  });
  </code></pre>
  
  <p>The jQuery <code>.toggle</code> callback function is used to add and remove classes to an element. Now according to the jQuery <code>.toggle</code> <a href="http://api.jquery.com/toggle/" rel="nofollow noreferrer">documentation</a>, <code>.toggle</code> is originally used to switch between visibility states of the selected element. </p>
  
  <p>I've made a jsfiddle demo: <a href="http://jsfiddle.net/taheri/nYdng/" rel="nofollow noreferrer">http://jsfiddle.net/taheri/nYdng/</a></p>
  
  <p>In my example here it seems to only alternate between call back functions, <em>and the visibility of the</em> <code>#user_button</code> <em>itself is not being toggled</em>. What am i missing out in the documentation here? Can toggle be used to only alternate between functions?</p>
  
  <p>Thank you!</p>