Created
March 25, 2016 14:40
-
-
Save serkanince/bfa97e406f1fcc3f6105 to your computer and use it in GitHub Desktop.
GeoComplate , AutoComplate Textbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input{ | |
width: 50%; | |
height: 35px; | |
padding: 5px; | |
margin: 5px; | |
} | |
.red{ | |
border: 1px #D92124 solid; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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