title: Hide button in btn-group twitter-bootstrap
body: <p>Sometimes we want to hide/show buttons in a Twitter-bootstrap button group.</p>
  
  <pre><code>&lt;div class="btn-group"&gt;
    &lt;button id="one" class="btn"&gt;one&lt;/button&gt;
    &lt;button id="two" class="btn"&gt;two&lt;/button&gt;
    &lt;button id="three" class="btn"&gt;three&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When we hide button "two" there is no problem</p>
  
  <pre><code>$('#two').hide();
  </code></pre>
  
  <p>But when we hide the first or the last button, the new first or new last button don't get rounded corners.</p>
  
  <p><img src="https://i.stack.imgur.com/Rr8xn.jpg" alt="enter image description here"></p>
  
  <p>Is there a workaround for this, other than just remove and add the buttons?</p>
  
  <pre><code>$('#one').remove();
  $('.btn-group').append("&lt;button id='one' class='btn'&gt;one&lt;/button&gt;");
  </code></pre>
  
  <p>When we do this, it is difficult to keep the right button order when you hiding/showing more buttons in a btn-group.</p>