Skip to content

Instantly share code, notes, and snippets.

@littlefuntik
Created October 13, 2015 15:06
Show Gist options
  • Save littlefuntik/c1016347fcb64f3ea448 to your computer and use it in GitHub Desktop.
Save littlefuntik/c1016347fcb64f3ea448 to your computer and use it in GitHub Desktop.
Показать иконку "В корзине" в списке товаров
var $msCart = $("#msCart");
$('.catalog__item__cart.in_basket').each(function(){
var $icon = $(this);
var productID = $icon.data("id");
if(productID) {
if($msCart.find("[data-number='" + productID + "']").length > 0)
$icon.removeClass("hidden");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment