1/// <reference path="../typings/globals/jquery/index.d.ts" /> 2var zip; 3var timer; 4function zipcode() { 5 zip = jQuery(".ziptoaddress"); 6 zip.on("change", function () { 7 stop_zip(); 8 get_address(jQuery(this)); 9 }); 10} 11function get_address(e) { 12 var t = jQuery("#" + e.attr("id") + "-target"); 13 var zc = e.val(); 14 if (zc.length <= 0 || zc === null) { 15 return; 16 } 17 var fn = zc.substring(0, 2); 18 var re = new RegExp("[^0-9]"); 19 var o; 20 if (fn.length < 2) { 21 return; 22 } 23 if (!re.test(fn)) { 24 jQuery.ajax({ 25 url: "/wp-content/themes/fsv002wp-basic-c01/assets/zip/" + fn + ".json", 26 dataType: "json" 27 }) 28 .done(function (data) { 29 for (var i = 0; i < data.zip.length; i++) { 30 var a = data.zip[i]; 31 if (zc === a[0]) { 32 t.val(a[5] + a[6]); 33 } 34 } 35 }) 36 .fail(function (data, s) { 37 return; 38 }); 39 } 40} 41function interval_zip() { 42 timer = setInterval(get_address, 200); 43} 44function stop_zip() { 45 clearInterval(timer); 46} 47window.addEventListener("load", zipcode);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.