Hi, I'm using Streamline theme and implemented ajaxify Add to cart, everything going well but found a problem on mobile view when adding products to empty cart the cart icon doesn't show up.
Here's my site: https://carabaoenergy.co.uk/
And ajax code that call to cart function.
cartCountSelector: '.cart-link__count'
$.getJSON(_config.shopifyAjaxCartURL, function(cart) {
if (_config.cartCountSelector && $(_config.cartCountSelector).length) {
var value = $(_config.cartCountSelector).html() || '0';
$(_config.cartCountSelector).html(value.replace(/[0-9]+/,cart.item_count)).removeClass('hide');
Thanks
ST
Looks like you need to change your cart selector to '.cart-link__bubble' which is hidden, not the '.cart-link__count' element. You should also change the 'aria-hidden' attribute to false when adding to cart as well.
I also noticed that your '.cart-link__count' element needs some styling fixes. For example, its text color is the same green as the background so it's not visible even if you unhide it.
User | Count |
---|---|
24 | |
24 | |
23 | |
19 | |
13 |