title: Uncaught TypeError: Cannot set property 'backgroundColor' of undefined
body: <pre><code>function put_to_cart_event(prodtitle, price, clicked_cell){
      var td = clicked_cell;
      alert(td);
      put_to_cart_({title: prodtitle, price: price}, function () {
          td.style.backgroundColor = '#859de6'; // &lt;--- problem
      });
  }
  </code></pre>
  
  <p>the alert is giving <code>[object Object]</code>, meaning the the <code>clicked_cell</code> is available and accessable, right? </p>
  
  <p>what am I missing here?</p>
  
  <p>the function is being called like this: </p>
  
  <pre><code>$('.abindenwarenkorb').on('click', function(){
      var productname = $('#productname').text();
      var price = $('#price').text();
      var in_stock = $('#in_stock').text();
      var clicked_cell = $('#clicked_cell').val(); //value is set like $('#clicked_cell').val($(this));
      put_to_cart_event(productname, price, clicked_cell); // &lt;-- call
  });
  </code></pre>