git.fiddlerwoaroof.com
static/js/fold.js
89bed873
 '';
 jQuery(document).ready(function () {
     jQuery('.link-header, .feed-header').click(function () {
         jQuery('.menu').addClass('open');
         return true;
     });
     jQuery('.link-header').click(function () {
         jQuery(this).siblings('.link-content').each(function () {
             if (jQuery(this).css('max-height') === '0px') {
                 var addedHeight = jQuery(this).children().outerHeight();
                 var parentHeight = jQuery(this).parents('.post-list').css('max-height');
                 jQuery(this).css('max-height', addedHeight);
                 return jQuery(this).parents('.post-list').css('max-height', addedHeight + parentHeight);
22c5d1a5
             } else {
89bed873
                 return jQuery(this).css('max-height', '0px');
22c5d1a5
             };
         });
89bed873
         return jQuery(this).parent().toggleClass('closed');
22c5d1a5
     });
89bed873
     jQuery('.feed-header').click(function () {
         jQuery(this).siblings('.post-list').each(function () {
             return jQuery(this).css('max-height') === '0px' ? jQuery(this).css('max-height', this.scrollHeight) : jQuery(this).css('max-height', '0px');
cd3f5f95
         });
89bed873
         return jQuery(this).parent().toggleClass('closed');
cd3f5f95
     });
89bed873
     jQuery('.flip-button').click(function () {
         var styleSheet = jQuery('link[href^="/theme"]');
7e6ea8df
         var styleSheetName = styleSheet.attr('href');
         return styleSheet.attr('href', styleSheetName.match(/dark/) ? styleSheetName.replace(/dark/, 'light') : styleSheetName.replace(/light/, 'dark'));
89bed873
     });
22c5d1a5
     return null;
cd3f5f95
 });