Skip to content

Instantly share code, notes, and snippets.

@serkanince
Created March 25, 2016 14:40
Show Gist options
  • Save serkanince/bfa97e406f1fcc3f6105 to your computer and use it in GitHub Desktop.
Save serkanince/bfa97e406f1fcc3f6105 to your computer and use it in GitHub Desktop.
GeoComplate , AutoComplate Textbox
input{
width: 50%;
height: 35px;
padding: 5px;
margin: 5px;
}
.red{
border: 1px #D92124 solid;
}
<form>
<div class="item">
<input id="autocomplete" placeholder="Adresiniz ..." type="text"></input>
</div>
<div class="item">
<input class="cat_textbox" id="street" data-geo="route" type="text" placeholder="Detay Adres" maxlength="50" />
</div>
<div class="item">
<input class="cat_textbox red" id="BillingAddress" data-geo="street_address" type="text" placeholder="Fatura Adres" maxlength="50" name="BillingAddress" />
</div>
</form>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>
$(document).ready(function() {
$("#autocomplete").geocomplete({
details: "form div",
detailsAttribute: "data-geo"
});
$('#street').on('propertychange change click keyup input paste', function(){
$('#BillingAddress').val(this.value);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment