From 0654e8cb38a34002599f8ca23a630b0b491dbff4 Mon Sep 17 00:00:00 2001 From: Will Coleda Date: Sun, 5 Nov 2023 00:15:10 -0400 Subject: [PATCH] Remove some (boilerplate?) JS? Part of #204 --- source/js.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/source/js.js b/source/js.js index f05e5f866..d40df77e3 100644 --- a/source/js.js +++ b/source/js.js @@ -1,28 +1,7 @@ jQuery(function ($) { - $.fn.sameHeight = function() { - var max = 0; - $(this).each(function(){ - var h = $(this).outerHeight(); - if ( h > max ) { max = h } - }); - - $(this).css('min-height', max + 'px'); - } - - $('.home section:eq(0) .panel-body, .home section:eq(1) .panel-body').sameHeight(); - $('footer ul').sameHeight(); - $('.equal-panels .panel-body').sameHeight(); - - if ( ! $('.bg').length ) { $('body').css({background: '#fff'}) } - - setup_recent_blog_posts(); -}); - -function setup_recent_blog_posts () { var el = $('#recent_blog_posts'); if ( ! el.length ) { return; } - $.ajax('recent-blog-posts.json') .done(function(feed) { $(feed).each(function(){ @@ -35,4 +14,4 @@ function setup_recent_blog_posts () { .fail(function() { el.append('
  • Failed to fetch recent blogs
  • '); }); -} +});