/** * cf-scrips.js * * Handles the Boostrap Back To Top */ $(document).ready(function() { // Only enable if the document has a long scroll bar // Note the window height + offset if ( ($(window).height() + 100) < $(document).height() ) { $('#top-link-block').removeClass('hidden').affix({ // how far to scroll down before link "slides" into view offset: {top:100} }); } // check height of comments div $commentsHeight = $("#comments").height(); // if the height is empty/nothing, then hide the div containing it if ($commentsHeight < 1) { $("#comments").parent().css("display", "none"); } // check height of footer outer contents div $footerOuterContentsHeight = $("body > .footer-outer .row").height(); // if the height is empty/nothing, then hide the div containing it if ($footerOuterContentsHeight < 2) { $("body > .footer-outer .row").parent().css("display", "none"); } });