Skip to content

Instantly share code, notes, and snippets.

@ivan-kalachikov
Created November 22, 2018 11:13
Show Gist options
  • Select an option

  • Save ivan-kalachikov/b02eaf5b244887bab702d065ad2cfd01 to your computer and use it in GitHub Desktop.

Select an option

Save ivan-kalachikov/b02eaf5b244887bab702d065ad2cfd01 to your computer and use it in GitHub Desktop.
IE Column-count extra space js solution
$(window).load(function () {
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
var bottom = $('.faq').offset().top + $('.faq').outerHeight();
var minimumSpace = 1000;
$('.faq .item').each(function (i, item) {
var space = bottom - ($(item).offset().top + $(item).outerHeight());
minimumSpace = (space < minimumSpace) ? space : minimumSpace;
});
$('.faq .inner').css('margin-bottom', 100 - minimumSpace);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment