Skip to content

Instantly share code, notes, and snippets.

@sabotawsh
Created July 14, 2020 21:18
Show Gist options
  • Save sabotawsh/1f43a91808c3b43d763661c06a582b22 to your computer and use it in GitHub Desktop.
Save sabotawsh/1f43a91808c3b43d763661c06a582b22 to your computer and use it in GitHub Desktop.
When a site wide banner is toggled on, push the fixed header down so they do not overlap.
// IF SITEWIDE BANNER IS ON
// PUSH SECONDARY ANCHOR NAV DOWN LOWER
(function($) { // Begin jQuery
$(function() { // DOM ready
if ($('.sitewide-banner')[0]) {
$('header').addClass('header--low');
};
}); // end DOM ready
})(jQuery); // end jQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment