Skip to content

Instantly share code, notes, and snippets.

@KaiserEMP
Created October 9, 2018 21:28
Show Gist options
  • Select an option

  • Save KaiserEMP/f4b47f161e1bdb7833df968cacb15756 to your computer and use it in GitHub Desktop.

Select an option

Save KaiserEMP/f4b47f161e1bdb7833df968cacb15756 to your computer and use it in GitHub Desktop.
sdf
function reserveHeaderSpace() {
if (!$('body').hasClass('not-top')) {
var headerHeight = $('header.header').outerHeight();
if (!$('body').hasClass("mobile-menu-visible")) {
if (!$('body').hasClass("search-visible")) {
$('.content-wrap').css('padding-top', headerHeight);
}
}
} else {
$('.content-wrap').css('padding-top', '');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment