Cart 0
A digital creative agency that specializes in custom Squarespace website development. We hail from LA!🌴
 

<script>

 /**

  * Hide Cart until items in the cart

  */

 (function () {

   var carts = [].slice.call(document.querySelectorAll('.Cart'));

   carts.forEach(function(cart) {

     hideCart(cart);

   });

   /**

    * Hide Cart

    */

   function hideCart(cart) {

     var cartQty = cart.querySelector('.sqs-cart-quantity');

     // Handler

     function handler(target) {

       if (target.innerHTML === '0') {

         cart.setAttribute('hidden', '');

       } else {

         cart.removeAttribute('hidden');

       }

     }

     // Observer handler

     var observer = new MutationObserver(function(mutations) {

       handler(mutations[0].target);

     });

     // Hide/show the cart when the page is loaded

     handler(cartQty);

     // Hide/show the cart when an item was added/removed

     observer.observe(cartQty, { childList: true });

   }

 })();

 </script>

 
PurpleGiraffe_FeatureThree.jpg