CSS class

js-ajax-cart-empty

A CSS class which is appended to the html tag when the user cart is empty.

Example

Hiding the cart quantity number in the header not to show “(0)”:

sections/header.liquid
<span class="header__cart-quantity">
  (
  <span data-ajax-cart-bind="item_count">
    {{ cart.item_count }}
  </span>
  )
</span>
assets/style.css
html.js-ajax-cart-empty .header__cart-quantity {
  display: none;
}