Skip to content

Instantly share code, notes, and snippets.

@mostlymeta
Created January 10, 2012 04:06
Show Gist options
  • Save mostlymeta/1586865 to your computer and use it in GitHub Desktop.
Save mostlymeta/1586865 to your computer and use it in GitHub Desktop.
example 2
$(function(){
$('#example2').bind('blur change', function(){
var $this = $(this);
geocode_address($this.val(), function(location){
if (location.formatted_address) {
$this.val(location.formatted_address);
$('#example2_city').val(location.city);
$('#example2_state').val(location.state);
} else {
$this.addClass('error');
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment