title: Issue hiding div with 'event.stopPropagation'
body: <p>Working on an Ajax cart for Shopify with Cart.JS. </p>
  
  <p>My original code for hiding showing the 'ajaxcart' container where originally:</p>
  
  <pre><code>&lt;script&gt;
    $(document).ready(function(){
      $("lightbox").hide();
      $("ajaxcart").hide();
      $('#button').click(function(event){
          $('lightbox').show().addClass('fadeIn').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', 
          function() {
            $(this).removeClass('fadeIn');
          });
          $('ajaxcart').show().addClass('slideInRight').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', 
          function() {
            $(this).removeClass('slideInRight');
          });
              event.stopPropagation();
      });
      $("#button").on("click", function (event) {
          event.stopPropagation();
      });
      $('html').click(function() {
        $('lightbox').show().addClass('fadeOut').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', 
          function() {
            $(this).removeClass('fadeOut');
              $(this).hide();
          });
          $('ajaxcart').show().addClass('slideOutRight').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', 
          function() {
            $(this).removeClass('slideOutRight');
            $(this).hide();
          });
      });
  
      $('ajaxcart').click(function(event){
          event.stopPropagation();
      }); 
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>However, when using the hide parts with <code>event.stopPropagation();</code>, it messes up the code to use the cart buttons due to stopping the events. </p>
  
  <p>I have created a live testing so you can see how the buttons in the cart does not respond: <a href="https://eldecosmetics.com/pages/bergen" rel="nofollow noreferrer">https://eldecosmetics.com/pages/bergen</a></p>
  
  <p>Any ideas how to safely hide the 'ajaxcart' container without stopping the events in the container and the Ajax, and without using the last part with <code>event.stopPropagation();</code> which seem to be the problem?</p>