Skip to content

Instantly share code, notes, and snippets.

View manobalas's full-sized avatar
:octocat:

Manobala S manobalas

:octocat:
View GitHub Profile
@manobalas
manobalas / collection-load-more.js
Created September 27, 2022 05:16 — forked from Maybach91/collection-load-more.js
[Shopify Load More Products Button Javascript] its the vanilla javascript version #shopify #loadmore #products #collection #tailwind
const products_on_page = document.getElementById('product-grid');
let next_url = products_on_page.dataset.nextUrl;
const load_more_btn = document.getElementsByClassName('load-more_btn')[0];
const load_more_spinner = document.getElementsByClassName('load-more_spinner')[0];
async function getNextPage() {
try {
let res = await fetch(next_url);
return await res.text();
} catch (error) {
@manobalas
manobalas / contact.html
Created July 11, 2020 17:46 — forked from atcraigwatson/contact.html
Bootstrap Ajax Contact Form
<form id="contact-form" method="post" action="mailer.php" role="form">
<div class="messages"></div>
<div class="controls">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="form_name">Firstname *</label>