# merchant/2.2.8/assets/js/scroll-direction.min.js

Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together &amp; More for WooCommerce – Merchant, version 2.2.8. 1 lines.

- Page: https://pluginprobe.com/plugins/merchant/2.2.8/code/assets/js/scroll-direction.min.js
- Raw: https://pluginprobe.com/plugins/merchant/2.2.8/raw/assets/js/scroll-direction.min.js
- Modified: 2026-06-15T19:43:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/merchant/2.2.8/code/assets/js/scroll-direction.min.js#L10-L20`.

```javascript
var merchant=merchant||{};merchant.scrollDirection={domReady:function(e){if("function"==typeof e)return"interactive"===document.readyState||"complete"===document.readyState?e():void document.addEventListener("DOMContentLoaded",e,!1)},init:function(){var t,e=document.querySelectorAll(".merchant-sticky-add-to-cart-wrapper.hide-when-scroll"),n=document.getElementsByTagName("body")[0];"null"!=typeof e&&(t=0,window.addEventListener("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop;t<e?(n.classList.remove("merchant-scrolling-up"),n.classList.add("merchant-scrolling-down")):(n.classList.remove("merchant-scrolling-down"),n.classList.add("merchant-scrolling-up")),t=e<=0?0:e},!1))}},merchant.scrollDirection.domReady(function(){merchant.scrollDirection.init()});
```
