Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function myVote(shortcode) {
$(document).on('submit', 'form', function() {
// Set product in local storage
localStorage.setItem(shortcode, "true");
// Refresh page after 3000 milliseconds
setTimeout(function() { location.reload(true); }, 3000);
const allthethings = [];
for(let i=0; i<localStorage.length; i++) {
let key = localStorage.key(i);
document.getElementById(localStorage.key(i)).style.display = "none";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment