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
var p1 = { | |
x: 20, | |
y: 20 | |
}; | |
var p2 = { | |
x: 40, | |
y: 40 | |
}; |
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
/* 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 | |
//---------------------------------------*/ |
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
<script> | |
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: mllegeorgesand@gmail.com | |
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus | |
// Modified by Jonathan Moore (Style Hatch) https://github.com/jonathanmoore | |
/* | |
Updated to work with sectioned themes | |
- Added required methods from the deprecated options_selection.js | |
- Triggers an initial variant change | |
- Hides sold out variants with only one option |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Putting User Input into JS Objects</title> | |
<style> | |
.formBox{ | |
padding: 0.5rem 2rem; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
<!-- | |
Combining async await with fetch | |
--> |