Skip to content

Instantly share code, notes, and snippets.

View enlightenedpie's full-sized avatar
👋
Hello! Is it me you're looking for?

David Paul enlightenedpie

👋
Hello! Is it me you're looking for?
View GitHub Profile
@enlightenedpie
enlightenedpie / ca_zips.json
Last active June 23, 2017 21:12
All CA ZIP Codes
{
"losangeles":[90895,91001,91006,91007,91011,91010,91016,91020,91017,93510,91023,91024,91030,91040,91043,91042,91101,91103,91105,93534,91104,93532,91107,93536,91106,93535,91108,93539,93543,93544,91123,93551,93550,93553,93552,93563,93590,91189,91202,91201,93591,91204,91203,91206,91205,91208,91207,91210,91214,91302,91301,91304,91303,91306,91307,91310,91311,91316,91321,91325,91324,91326,91331,91330,91335,91340,91343,91342,91345,91344,91350,91346,91352,91351,91354,91356,91355,91357,91361,91364,91367,91365,91381,91380,91384,91387,91390,91402,91401,91403,91406,91405,91411,91423,91436,91495,91501,91502,91505,91504,91506,91602,91601,91604,91606,91605,91607,91614,91706,91702,91711,91722,91724,91723,91732,91731,91733,91735,91740,91741,91745,91744,91747,91746,91748,91750,91755,91754,91759,91765,91767,91766,91768,91770,91773,91772,91776,91775,91780,91778,91790,91789,91792,91791,91793,91801,91803,91008,92397,90002,90001,90004,90003,90006,90005,90008,90007,90010,90012,90011,90014,90013,90016,90015,90018,90017,90020,90019
<option value="US">United States</option>
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
const optcode1 = document.getElementById("otpcode1");
const optcodes = document.querySelectorAll('input[id^="otpcode"]');
const codeInput = document.getElementById("code");
const otpForm = document.getElementById("validation-code-submit-form");
let popuNext = (el, data) => {
el.value = data[0]; // Apply first item to first input
data = data.substring(1); // remove the first char.
if (el.nextElementSibling && data.length) {
// Do the same with the next element and next data