Skip to content

Instantly share code, notes, and snippets.

View marklreyes's full-sized avatar

Mark Reyes marklreyes

View GitHub Profile
@marklreyes
marklreyes / liquid
Created October 27, 2020 17:56
FAQ Section for Shopify
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="container-fluid">
<div id="container-category-faq">
{% for block in section.blocks %}
{% if block.type == 'header' %}
<h3 id="category-faq-title" class="text-center">{{block.settings.header}}</h3>
{% else %}
// https://codeburst.io/learn-how-to-handle-javascript-errors-with-try-throw-catch-finally-83b4f9ef8c6f
try {
let hello = prompt("Type hello");
if (hello !== 'hello'){
throw new Error("Oops, you didn't type hello");
}
}
catch(e) {
alert(e.message);
}