Skip to content

Instantly share code, notes, and snippets.

View darana's full-sized avatar

darana

  • Planet Earth (usually)
View GitHub Profile
@darana
darana / lazyload-child.js
Created September 5, 2017 17:39 — forked from cobbweb/lazyload-child.js
Lazyload Children
(function(window) {
'use strict';
var raf = window.requestAnimationFrame;
var CLOSESNESS = 2;
function startLoop(fn) {
var running = false;
var lastExit;
1. add snippet to cart.liquid file at the bottom of the file
{% include 'upsell-modal' %}
2. add css to theme.liquid in the header
{{ 'upsell-modal.scss' | asset_url | stylesheet_tag }}