CSS class

js-ajax-cart-init

A CSS class which is appended to the html tag when Liquid Ajax Cart is initialized.

Example

Hiding the “Update” button on the cart page, as all the elements are ajaxified and no need to apply the changes manually:

sections/main-cart.liquid
<div class="my-cart-page" data-ajax-cart-section>
  <h2>Cart page</h2>

  <div class="my-cart-page__items">
    <!-- Cart items -->
  </div>

  <form id="my-cart-page-form" action="{{ routes.cart_url }}" method="post">
    <button type="submit" name="update" class="my-cart-page__update-button">
      Update
    </button>
    <button type="submit" name="checkout">
      Checkout — {{ cart.total_price | money_with_currency }}
    </button> 
  </form>
</div>

{% schema %} { "name": "Cart page" } {% endschema %}
assets/style.css
html.js-ajax-cart-init .my-cart-page__update-button {
  display: none;
}