Skip to content

Commit

Permalink
* **Tweak** - Navbarscrolltotop: compatibility with WooCommerce check…
Browse files Browse the repository at this point in the history
…out page
  • Loading branch information
nicomollet committed Dec 18, 2017
1 parent 2ba32ff commit fdfdb63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion js/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit fdfdb63

Please sign in to comment.