title: Equivalent of deprecated jQuery Toggle Event
body: <p>jQuery's <a href="http://api.jquery.com/toggle-event/">Toggle Event</a> function has <a href="https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfntogglehandler-handler-is-deprecated">been removed</a> as part of version 1.9.</p>
  
  <p>I was using this function like so:</p>
  
  <pre><code>$('#example').toggle(function() {
      do stuff
  }, function() {
      do stuff
  });
  </code></pre>
  
  <p>What would be the best way to reproduce this functionality now Toggle Event has gone?</p>