title: BigCommerce custom javascript on checkout page not working
body: <p>I need to hide tax price div on checkout page.
  I added javascript code to checkout.html but it doesn't find element and occurring error in console.
  It seems javascript runs before element loaded.
  If I run script on console, it works well.
  How to solve this?
  I added whole checkout.html file.
  I added script at the end of html file.</p>
  
  <pre><code>{{#partial "head"}}
  
  {{{ checkout.checkout_head }}}
  {{{ stylesheet '/assets/css/optimized-checkout.css' }}}
  {{ getFontsCollection }}
  
  &lt;script type="text/javascript"&gt;
      window.language = {{{langJson 'optimized_checkout'}}};
  &lt;/script&gt;
  
  {{{head.scripts}}}
  
  {{/partial}}
  
  {{#partial "page"}}
  &lt;header class="checkoutHeader optimizedCheckout-header"&gt;
      &lt;div class="checkoutHeader-content"&gt;
          &lt;h1 class="is-srOnly"&gt;{{lang 'checkout.title'}}&lt;/h1&gt;
          &lt;h2 class="checkoutHeader-heading"&gt;
              &lt;a class="checkoutHeader-link" href="{{urls.home}}"&gt;
                  {{#if checkout.header_image}}
                      &lt;img alt="{{settings.store_logo.title}}" class="checkoutHeader-logo" id="logoImage" src="{{ checkout.header_image }}"/&gt;
                  {{ else }}
                      &lt;span class="header-logo-text"&gt;{{settings.store_logo.title}}&lt;/span&gt;
                  {{/if}}
              &lt;/a&gt;
          &lt;/h2&gt;
      &lt;/div&gt;
  &lt;/header&gt;
  &lt;div style="text-align:center;padding:4px;color: #ff0000;font-size:14px;"&gt;Sales tax will be removed during step 2 for all states, except PA, TX &amp; WA.&lt;/div&gt;
  {{{ checkout.checkout_content }}}
  
  {{{ footer.scripts }}}
  
  {{/partial}}
  
  {{&gt; layout/empty}}
  
  ***&lt;script type="text/javascript"&gt;
         document.querySelector('[data-test="cart-taxes"]').style.display = "none"; 
  &lt;/script&gt;***
  </code></pre>