Last active
January 14, 2021 16:17
-
-
Save akopcz2/0b4f3084aa5a3dda363ab1141139be8a to your computer and use it in GitHub Desktop.
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
<!-- UNIFY CUSTOM --> | |
<div class="uni-addon-products"> | |
<h4>Receive Your Treats Every:</h4> | |
<select class="weekSelect"> | |
<option deselected>Select Frequency</option> | |
<option value="2">One Time Purchase</option> | |
<option value="3" selected>Every 1 Week</option> | |
<option value="4">Every 2 Weeks</option> | |
<option value="5">Every 3 Weeks</option> | |
<option value="6">Every 4 Weeks</option> | |
</select> | |
</div> | |
<div style="clear:both;"></div> | |
<a href="/pages/bakery-builder/?week=3" style="margin-top: 30px;" id="unify-custom-buy" class="btn button bakery-cta bab-link">CHOOSE YOUR TREATS</a> | |
<style type="text/css"> | |
.variant-input-wrap { | |
display:none; | |
} | |
.uni-addon-products ul { | |
margin: 0; | |
padding: 0; | |
} | |
.uni-addon-products ul li { | |
list-style: none; | |
float: left; | |
margin-bottom: 8px; | |
} | |
.uni-addon-products ul li.uni-gap { | |
margin-left: 10px; | |
} | |
.uni-addon-products ul li input[type="radio"] { | |
display: none; | |
} | |
.uni-addon-products ul li input[type="radio"]+label { | |
padding: 10px; | |
border: 2px solid #e8e8e1; | |
} | |
.uni-addon-products ul li input[type="radio"]:checked+label { | |
border-color: #000; | |
} | |
.bakery-cta{ | |
border-radius:20px; | |
} | |
</style> | |
<script> | |
document.addEventListener('DOMContentLoaded', function(){ | |
document.querySelector('.weekSelect').addEventListener('change', function() { | |
console.log('You selected: ', this.value); | |
var bcta = document.querySelector('.bakery-cta'); | |
bcta.href = `/pages/bakery-builder?week=${this.value}`; | |
}); | |
}) | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment