title: Button toggle-class remains active upon pressing another button
body: <p>I'm writing a Greasemonkey script and having a problem setting the active states for two buttons I'm adding, each for toggling.</p>
  
  <p>I've added code to assign class. The problem occurs when switching buttons.</p>
  
  <p>For instance, when I press <strong><em>Button A</em></strong>, it becomes active.  But then, if I press <strong><em>Button B,</em></strong> <em><strong>Button A</em></strong> remains active. Thereby leaving me with two buttons in an active state.</p>
  
  <p>I know I can remove the active class by pressing my active button again prior going to another button. However I would like to achieve a function whereby, if <em>Button A</em> is active, and I press <em>Button B</em>, then <em>Button A</em> loses its active class, and vice versa.</p>
  
  <p>Here is the code I'm using that's assigning class to my buttons:</p>
  
  <pre><code>$('#ButtonA').toggle(function () { 
      $("#ButtonA").addClass("active"); }, function () {
      $("#ButtonA").removeClass("active");
  });
  
  $('#ButtonB').toggle(function () {
      $("#ButtonB").addClass("active"); }, function () {
      $("#ButtonB").removeClass("active"); 
  });
  </code></pre>