Skip to content

Instantly share code, notes, and snippets.

@cshold
cshold / supply-footer-middle
Created June 13, 2014 15:58
Middle column of the Shopify Supply theme
@cshold
cshold / shop.js
Created August 15, 2014 19:58
Shopify Ajax Cart Callback
// Create a global function that handles all cart-related JS
initCart = function (obj) {
// Do all cart things here
// If running as the ajax cart callback, an object is returned
if (obj.is_visible) {
// the cart is shown
} else {
// the cart was hidden
}
@cshold
cshold / shop.js
Last active February 10, 2025 17:40
React's raw zoom JS
window.timber = window.timber || {};
timber.cacheSelectors = function () {
timber.cache = {
// Product Page
$productImageWrap: $('#productPhoto'),
$productImage: $('#productPhotoImg'),
$thumbImages: $('#productThumbs').find('a.product-photo-thumb')
}
};