code: function(callback) {
          if ($.type(callback) !== 'function') {
              callback = function(section) {
                  return section.outerHeight();
              };
          }
  
          this.sections.each(function() {
              var self = $(this),
                  className = self.hasClass('hide') ? 'hide' : 'show',
                  maxHeight = self.css('max-height');
  
              // Make section visible
              self.addClass('no-transition').removeClass(className).css('max-height', '');
  
              // Get the height
              var height = callback.call(this, self);
  
              // Set section back to previous state
              self.addClass(className).css('max-height', maxHeight).removeClass('no-transition');
  
              // Set the height
              self.data('accordion-height', height);
  
              if (self.hasClass('show')) {
                  self.css('max-height', height);
              }
          });
      }
docs: Loop through each section and calculate/cache it's current height.
  An optional callback can be defined that will be used for height calculation.
  
  @param {Function} [callback]