Skip to content

Commit

Permalink
Remove some (boilerplate?) JS?
Browse files Browse the repository at this point in the history
Part of #204
  • Loading branch information
coke committed Nov 5, 2023
1 parent 46e3967 commit 0654e8c
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions source/js.js
Original file line number Diff line number Diff line change
@@ -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(){
Expand All @@ -35,4 +14,4 @@ function setup_recent_blog_posts () {
.fail(function() {
el.append('<li><i>Failed to fetch recent blogs</i></li>');
});
}
});

0 comments on commit 0654e8c

Please sign in to comment.