title: Have to click twice to run a function via Bootstrap buttons plugin
body: <p>Why I have to click twice to run a function that uses <code>active</code> class added by Bootstrap buttons plugin?</p>
  
  <pre><code>var monthly = $("input[name='montly_total']");
  var once = $("input[name='once_total']");
  
  $(".button-selector").click(function () {
   $(".button-selector.monthly.active").sum("click", monthly);
   $(".button-selector.once.active").sum("click", once)
  });
  </code></pre>
  
  <p>Live example: <a href="http://jsfiddle.net/ynts/3Z6sm/" rel="nofollow">http://jsfiddle.net/ynts/3Z6sm/</a>. Inputs are updated only on a second click on a button.</p>