This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- if section.blocks.size > 0 -%} | |
{%- for block in section.blocks -%} | |
{%- case block.type -%} | |
{%- when 'html' -%} | |
{%- if block.settings.enable_promo -%} | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.Marquee/1.5.0/jquery.marquee.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script> | |
<script> | |
$(function() { | |
$('.marquee').marquee({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ 'option_selection.js' | shopify_asset_url | script_tag }} | |
<script> | |
// <![CDATA[ | |
var selectCallback = function(variant, selector) { | |
if (variant) { | |
if (variant.available) { | |
// Selected a valid variant that is available. | |
$('#add-to-cart-button').removeClass('disabled').removeAttr('disabled').html('Add to Cart'); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Input.cart | |
FREEBIE_PRODUCT_PRICE = Money.zero | |
FREEBIE_PRODUCT_ID = 0 | |
coupon_codes = Array["anniversary25", "coupon2", "coupon3"] | |
if Input.cart.discount_code != nil | |
if coupon_codes.include?(Input.cart.discount_code.code) | |
if Input.cart.line_items.size > 1 | |
Input.cart.line_items.select do |line_item| | |
if FREEBIE_PRODUCT_PRICE == Money.zero | |
FREEBIE_PRODUCT_PRICE = line_item.variant.price |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Where do I belong | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-where-do-i-belong | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function where(arr, num) { | |
// Find my place in this sorted array. | |
var indexOfNum; | |
//sort from lowest to highest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Seek and Destroy | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function destroyer(arr) { | |
// Remove all the values | |
//get other values (arguments) that are put into the parameters of destroyer | |
var removeChars = Array.prototype.slice.call(arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Falsy Bouncer | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function bouncer(arr) { | |
// Don't show a false ID to this bouncer. | |
function noFalsyVals(value){ | |
//function used in conjunction with filter() function | |
//compares falsy values and returns value if none are found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Mutations | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-mutations | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function mutation(arr) { | |
/* | |
compareChars is made into an array of lowerCase letters | |
compareToString is the string to compare the letters with and it is lowercased |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Slasher Flick | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function slasher(arr, howMany) { | |
// it doesn't always pay to be first | |
//howMany is the number we must remove from our array of arr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bonfire: Chunky Monkey | |
// Author: @joepichardo | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-chunky-monkey | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function chunk(arr, size) { | |
// Break it up. | |
//two empty arrays to make a two dimensional array | |
var outerArray = []; |
NewerOlder