From fdfdb63e39b4cdaa440684585ff59579fa838ee9 Mon Sep 17 00:00:00 2001 From: Nico Mollet Date: Mon, 18 Dec 2017 09:32:48 +0100 Subject: [PATCH] * **Tweak** - Navbarscrolltotop: compatibility with WooCommerce checkout page --- CHANGELOG.md | 1 + js/src/common.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee04b84..2aa3d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Unreleased * **Tweak** - Jetpack: Infinite Scroll compatibility in product archive +* **Tweak** - Navbarscrolltotop: compatibility with WooCommerce checkout page ### 0.4.3: December 13th, 2017 * **Fix** - Nav Stuck To Top: adjust to #navigation height, not #header height diff --git a/js/src/common.js b/js/src/common.js index e8112b0..0b5ed59 100644 --- a/js/src/common.js +++ b/js/src/common.js @@ -40,7 +40,9 @@ jQuery(function($) { // DOM is now ready and jQuery's $ alias sandboxed if (st > lastScrollTop){ // going down //$('#navigation').addClass('navbar-outofview'); // nico 2017/05/23 testing without this line to check behaviour } else { // going up - $('#navigation').removeClass('navbar-outofview'); //up + if(!$('body').hasClass('woocommerce-checkout')){ // on woocommerce-checkout does not display navbar + $('#navigation').removeClass('navbar-outofview'); + } } lastScrollTop = st; });