Skip to content

Instantly share code, notes, and snippets.

View shopifydavid's full-sized avatar

David shopifydavid

View GitHub Profile
@atikju
atikju / related-articles.liquid
Created February 25, 2021 11:24
Show related articles based on article tags - Shopify
@rickydazla
rickydazla / ajax-submit-form.js
Created December 10, 2015 03:13
Shopify AJAX Form submit
/* Build the Shopify Parameters
//---------------------------------------*/
var action = '/contact?';
action += encodeURIComponent('form_type') +'='+ encodeURIComponent('contact');
action += '&'+ encodeURIComponent('utf8') +'='+ encodeURIComponent('✓');
action += '&'+ encodeURIComponent('contact[email]') +'='+ encodeURIComponent(contact_email);
action += '&'+ encodeURIComponent('contact[body]') +'='+ encodeURIComponent(contact_body);
/* Submit the form
//---------------------------------------*/
%reset-Button {
border: none;
margin: 0;
padding: 0;
width: auto;
overflow: visible;
background: transparent;
/* inherit font & color from ancestor */