Collection: pajamagram test 3

Family Member:

< script > $(document).ready(function() { $('#product_wrapper-1 .size-attribute').click(function() { $('#product_wrapper-1 .size-attribute.selected').removeClass('selected'); $(this).addClass('selected'); }); /** Add To Cart */ $('#add_to_cart-1').click(function() { var variant_id = $('#product_wrapper-1 .size-attribute.selected span').data('id'); var quantity = $('#product_wrapper-1 .quantity-input input[name="quantity"]').val(); $.ajax({ type: 'POST', url: '/cart/add.js', dataType: 'json', data: { id: variant_id, quantity: quantity }, success: function() { // location.href="/cart"; $.getJSON('/cart.js', function(cart) { $('.cart-count-bubble span').text(cart.item_count); $('a#cart-icon-bubble span.visually-hidden').after('
' + cart.item_count + ' items
') $('a#cart-icon-bubble span.visually-hidden').remove(); }); $.ajax({ url: '/?section_id=cart-drawer', type: 'GET', dataType: 'html', success: function(carthtml) { $(".drawer").addClass("active"); if ($("cart-drawer.drawer").hasClass('is-empty')) { $('cart-drawer').html($(carthtml).find('cart-drawer').html()); $("cart-drawer.is-empty .drawer__header").css("display", "block"); $("cart-drawer.is-empty .drawer__footer").css("display", "block"); $("cart-drawer.is-empty .cart__contents").css("display", "block"); $("cart-drawer.drawer").removeClass('is-empty'); $("#CartDrawer-Overlay").click(function() { $("cart-drawer.drawer").removeClass('active'); }); } else { $("cart-drawer").html($(carthtml).find('cart-drawer').html()); } } }); } }); }); /** Left Side product Slider */ $('.slick-slider_image_1').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, dots: false, fade: true, asNavFor: '.thumb_slider_add_1' }); $('.thumb_slider_add_1').slick({ slidesToShow: 4, slidesToScroll: 1, dots: false, arrows: false, focusOnSelect: true, centerMode: true, asNavFor: '.slick-slider_image_1', }); // Get all elements with the class "group-wraaper-cover" var allGroups = $(".group-wraaper-cover"); var uniqueGroups = {}; allGroups.each(function() { var dataGroup = $(this).find('.group').attr('data-group'); if (!uniqueGroups[dataGroup]) { uniqueGroups[dataGroup] = true; } else { $(this).remove(); } }); }); < script > $(document).ready(function() { $('#product_wrapper-2 .size-attribute').click(function() { $('#product_wrapper-2 .size-attribute.selected').removeClass('selected'); $(this).addClass('selected'); }); /** Add To Cart */ $('#add_to_cart-2').click(function() { var variant_id = $('#product_wrapper-2 .size-attribute.selected span').data('id'); var quantity = $('#product_wrapper-2 .quantity-input input[name="quantity"]').val(); $.ajax({ type: 'POST', url: '/cart/add.js', dataType: 'json', data: { id: variant_id, quantity: quantity }, success: function() { // location.href="/cart"; $.getJSON('/cart.js', function(cart) { $('.cart-count-bubble span').text(cart.item_count); $('a#cart-icon-bubble span.visually-hidden').after('
' + cart.item_count + ' items
') $('a#cart-icon-bubble span.visually-hidden').remove(); }); $.ajax({ url: '/?section_id=cart-drawer', type: 'GET', dataType: 'html', success: function(carthtml) { $(".drawer").addClass("active"); if ($("cart-drawer.drawer").hasClass('is-empty')) { $('cart-drawer').html($(carthtml).find('cart-drawer').html()); $("cart-drawer.is-empty .drawer__header").css("display", "block"); $("cart-drawer.is-empty .drawer__footer").css("display", "block"); $("cart-drawer.is-empty .cart__contents").css("display", "block"); $("cart-drawer.drawer").removeClass('is-empty'); $("#CartDrawer-Overlay").click(function() { $("cart-drawer.drawer").removeClass('active'); }); } else { $("cart-drawer").html($(carthtml).find('cart-drawer').html()); } } }); } }); }); /** Left Side product Slider */ $('.slick-slider_image_2').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, dots: false, fade: true, asNavFor: '.thumb_slider_add_2' }); $('.thumb_slider_add_2').slick({ slidesToShow: 4, slidesToScroll: 1, dots: false, arrows: false, focusOnSelect: true, centerMode: true, asNavFor: '.slick-slider_image_2', }); // Get all elements with the class "group-wraaper-cover" var allGroups = $(".group-wraaper-cover"); var uniqueGroups = {}; allGroups.each(function() { var dataGroup = $(this).find('.group').attr('data-group'); if (!uniqueGroups[dataGroup]) { uniqueGroups[dataGroup] = true; } else { $(this).remove(); } }); });
Liquid error (sections/family-main-collection-product-grid line 107): Could not find asset snippets/recently-viewed.liquid