title: Simple jQuery Code For Shopify
body: <p>hopefully one of you can help me. I have this simple jQuery code and everything works but I just want to modify this code so that it only executes when a person clicks on "Add To Cart".</p>
  
  <p>Here is the link to the shopify theme I'm using: <a href="https://venture-theme-snowboards.myshopify.com/collections/snowboards/products/dc-mens-tone-snowboard-2015" rel="nofollow noreferrer">https://venture-theme-snowboards.myshopify.com/collections/snowboards/products/dc-mens-tone-snowboard-2015</a></p>
  
  <p>Here is the code i'm using:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script&gt;
      window.setTimeout(redirectCheckout, 2000);
      function redirectCheckout(){
    if(!(window.location.href.includes("?1"))){
      window.location.href = "https://www.example.com/checkout";
    }
      }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help would be much apperciated!</p>