Skip to content

Instantly share code, notes, and snippets.

@ViacheslavBedilo
Last active February 15, 2019 10:01
Show Gist options
  • Save ViacheslavBedilo/57132b8ba6ca13d3275b2a3b19c540ef to your computer and use it in GitHub Desktop.
Save ViacheslavBedilo/57132b8ba6ca13d3275b2a3b19c540ef to your computer and use it in GitHub Desktop.
//add zip code by ip
setTimeout(function () {
$.getJSON('https://ipapi.co/json/', function (data) {
var zipcode = data.postal;
$('.main_search_bar #address_search').val(zipcode);
$('.search_bar .btn').trigger('click');
});
}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment