Skip to content

Instantly share code, notes, and snippets.

View schmoove's full-sized avatar

Ryan Marshall schmoove

View GitHub Profile
<!--[if (mso)|(IE)]><table width="600" align="center" cellpadding="0" cellspacing="0" role="presentation"><tr><td><![endif]-->
<div style="display:block; margin: 20px 0; max-width: 600px; min-width: 320px;">
<!--[if !vml]-->
<a href="{{ image.url }}" class="video-preview" style="background-color: #5b5f66; background-image: radial-gradient(circle at center, #5b5f66, #1d1f21); display: block; text-decoration: none;">
<table cellpadding="0" cellspacing="0" border="0" width="100%" background="{{ image.medium_url }}" role="presentation" style="animation: video-frames 15s ease infinite; -webkit-animation: video-frames 15s ease infinite; background-size: cover; min-height: 180px; min-width: 320px;">
<tr style="transition: all .5s cubic-bezier(0.075, 0.82, 0.165, 1);">
<td width="25%">
<img src="http://placehold.it/150x337.gif?text=+" alt="" width="100%" border="0" style="hei
<style>
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
@schmoove
schmoove / jquery.shopify-ajax-cart.js
Last active February 1, 2023 17:41
A handy jQuery plugin for updating the Shopify Cart via their AJAX API
/*
* Project: Shopify AJAX Cart Plugin
* Description: Provides AJAX cart functionality for interacting with the Shopify AJAX API so you don't need an "Update Cart" button
* Dependency: jQuery 1.6+
* Author: Ryan Marshall (ryan@schmoove.co.nz)
* License: Free
* Usage:
*
* $('#cart-form').shopifyAJAXCart({
* item: '.line-item-container',