Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If you select an address from the dropbox, it will replace the curren…

…t value in the input field. Fixes #21.
  • Loading branch information...
commit ee430de3c7cf62cbb58c97775daebcebb42f561b 1 parent 08f2c18
@palewire palewire authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 jquery.geocodify.js
View
9 jquery.geocodify.js
@@ -231,6 +231,8 @@
} else if (count === 1 && force) {
settings.onSelect(results[0]);
$this.reset();
+ $this.previousSearch = results[0].formatted_address;
+ input.val(results[0].formatted_address);
} else {
var ul = $("<ul>").css({'margin': 0, 'padding': 0, 'background-color': 'white'});
$.each(keep, function(i, val) {
@@ -244,7 +246,12 @@
'font-size': settings.fontSize,
'text-align': 'left'
})
- .click(function(){settings.onSelect(val); $this.reset();})
+ .click(function(){
+ settings.onSelect(val);
+ $this.reset();
+ $this.previousSearch = val.formatted_address;
+ input.val(val.formatted_address);
+ })
.hover(
function() {
$(this).css({'background-color': '#EEE', 'cursor': 'pointer'});
Please sign in to comment.
Something went wrong with that request. Please try again.