code: function(e) {
        var t = this,
            h1 = $(e.currentTarget),
            div = h1.find('+div'),
            section = div.attr('class').substr(6),
            wasClosed = div.height() === 0;
  
        // Animate the height.  Can't do CSS animations, because CSS
        // requires specific start/end points, and can't animate from
        // height:auto to height:0px.
        if (wasClosed) {
          var divHeight = div.css({height:'auto'}).height();
          h1.toggleClass('closed', false);
          div.css({height:0});
          div.animate({height:divHeight}, 200, function(){
            div.css({height:'auto'});
          });
        } else {
          div.animate({height:0}, 200, function(){
            h1.toggleClass('closed', true);
          });
        }
  
        // Change the data model
        t.sidebar.get('tree').get('branches').get(section).set('isOpen', wasClosed);
      }
docs: Open/close the section