title: JavaScript onclick event not working on mobile device
body: <p>We are running Opencart 1.5.6.4 which uses the below code to add an item to cart.</p>
  
  <pre><code>&lt;input type="button" value="&lt;?php echo $button_cart; ?&gt;" onclick="addToCart('&lt;?php echo $product['product_id']; ?&gt;');" class="button" /&gt;
  </code></pre>
  
  <p>We've noticed that, on mobile devices, the Javascript onclick event does not appear to be working.</p>
  
  <p>The javascript function is as follows</p>
  
  <pre><code>function addToCart(product_id, quantity) {
      quantity = typeof(quantity) != 'undefined' ? quantity : 1;
  
          $.ajax({
              url: 'index.php?route=checkout/cart/add',
              type: 'post',
              data: 'product_id=' + product_id + '&amp;quantity=' + quantity,
              dataType: 'json',
              success: function(json) {
                  $('.success, .warning, .attention, .information, .error').remove();
  
                  if (json['redirect']) {
                      location = json['redirect'];
                  }
  
                  if (json['success']) {
                      $('#notification').html('&lt;div class="success" style="display: none;"&gt;' + json['success'] + '&lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;&lt;/div&gt;');
  
                      $('.success').fadeIn('slow');
  
                      $('#cart-total').html(json['total']);
  
                      $('html, body').animate({ scrollTop: 0 }, 'slow'); 
                  }   
              }
          });
      }
  </code></pre>