Skip to content

Instantly share code, notes, and snippets.

@tomhanlon
tomhanlon / Much much simpler option selector for Shopify
Created May 3, 2021 16:32 — forked from skillmatic-co/Much much simpler option selector for Shopify
Much simpler version of Shopify's option_selection.js for separating product options into their own dropdown menus.
<form action="/cart/add" method="post">
{% if product.variants.size > 1 %}
{% if product.options[0] %}
<label for="select-one">{{ product.options[0] }}</label>
<select id="select-one" onchange="letsDoThis()">
{% for value in product.options_with_values[0].values %}
<option value="{{ value }}" {% if product.options_with_values[0].selected_value == value %}selected{% endif %}>
{{ value }}
</option>
{% endfor %}
@tomhanlon
tomhanlon / gist:4c65ffdf051ae941052709cbc9fedeac
Created December 30, 2018 02:13 — forked from Miserlou/gist:11500b2345d3fe850c92
1000 Largest US Cities By Population
Largest 1000 Cities in America
2013 popuation data - Biggest US Cities By Population
rank,city,state,population,2000-2013 growth
1,New York,New York,8405837,4.8%
2,Los Angeles,California,3884307,4.8%
3,Chicago,Illinois,2718782,-6.1%
4,Houston,Texas,2195914,11.0%
5,Philadelphia,Pennsylvania,1553165,2.6%