Skip to content

Instantly share code, notes, and snippets.

@sabotawsh
Created July 14, 2020 21:17
Show Gist options
  • Save sabotawsh/6f3f00dd2f2d84e46e19b0f181edf702 to your computer and use it in GitHub Desktop.
Save sabotawsh/6f3f00dd2f2d84e46e19b0f181edf702 to your computer and use it in GitHub Desktop.
If site wide banner is toggled on, nudge fixed header down
// WOOCOMMERCE – IF SITE WIDE BANNER IS ACTIVE
// DROP MAIN NAV DOWN
if ( jQuery('.woocommerce-store-notice').css('display') == "block") {
$('header.navigation').addClass('drop-low');
}
// IF SITE WIDE BANNER IS DISMISSED
// BRING MAIN NAVIGATION BACK TO TOP
$('.woocommerce-store-notice__dismiss-link').on('click', function(){
$('header.navigation.drop-low').removeClass('drop-low');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment