title: Minimize / Maximize div's with jQuery
body: <p>I basically want to minimise some div's . Instead of using "-" and "+", I want to use some symbols (from font-awesome) to minimise and maximise the div's. </p>
  
  <p>My question concerning this; how can I insert the classes of the icons in this piece of code? I tried by replacing the .html part with .attr, but that didn't worked out.</p>
  
  <pre><code>&lt;script&gt;
    $(".btn-minimize").click(function(){
      if($(this).html() == "-"){
        $(this).html("+");
      }
      else{
        $(this).html("-");
      }
      $(".widget-content").slideToggle();
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks a lot.</p>
  
  <p>Update:</p>
  
  <p>Thanks a lot for your help so far. But the sibling part doesn't really fit me because <code>.widget-content</code> isn't one of the button. </p>
  
  <p>So to summarise; when I want to minimise one widget and press to button, all the widgets with the class <code>.widget-content</code> minimise.</p>
  
  <p><strong>This is a piece of my HTML</strong></p>
  
  <pre><code>&lt;!--widget-1-2--&gt;
     &lt;section class="widget span3"&gt;
        &lt;!--front--&gt;
        &lt;div id="front" class="widget-1-2 flip"&gt;
           &lt;div class="widget-header"&gt;
              &lt;h2&gt;Monthly Statistics&lt;/h2&gt;
              &lt;div class="btn-group pull-right"&gt;
                 &lt;button id="btn-front" class="btn"&gt;&lt;i class="icon-cogs icon-white" alt="settings"&gt;&lt;/i&gt;&lt;/button&gt;
                 &lt;button class="btn btn-minimize"&gt;&lt;i class="icon-chevron-up icon-white" alt="minimize"&gt;&lt;/i&gt;&lt;/button&gt;
                 &lt;button class="btn btn-close"&gt;&lt;i class="icon-remove icon-white" alt="close"&gt;&lt;/i&gt;&lt;/button&gt;
              &lt;/div&gt;
           &lt;/div&gt;
        &lt;div class="widget-content"&gt;&lt;p&gt;Dit is de voorkant.&lt;/p&gt;&lt;/div&gt;
     &lt;/div&gt;&lt;!--/front--&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p><strong>And the JavaScript part:</strong></p>
  
  <pre><code>&lt;script&gt;
     $(".icon-chevron-up").click(function(){
         $(this).toggleClass("icon-chevron-down");
         $(".widget-content").slideToggle();
      });
  &lt;/script&gt;
  </code></pre>