Created
November 22, 2018 11:13
-
-
Save ivan-kalachikov/b02eaf5b244887bab702d065ad2cfd01 to your computer and use it in GitHub Desktop.
IE Column-count extra space js solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(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