Looking for a quick answer. Please help.
I want to reinitialize the geocomplete when ever country select box changes. I am restricting result for selected country.
My code:
var initGeoComplete = function (){
var country = $('#geoCountry').val();
//country = country || 'in';
$("#searchGeoLocation").geocomplete({
details: ".search-geo-details",
detailsAttribute: "data-geo",
componentRestrictions: {country: country}
});
};
I am trying to reinitialize the input with new geocomplete with different country everytime the country select #geoCountry changes. But results remains same with what it was initially set.
$(document).on('change', "#geoCountry", function () {
initGeoComplete();
});
Hi everyone,
Looking for a quick answer. Please help. I want to reinitialize the geocomplete when ever country select box changes. I am restricting result for selected country.
My code:
I am trying to reinitialize the input with new geocomplete with different country everytime the country select
#geoCountry
changes. But results remains same with what it was initially set.Quick help is highly appreciated.