私のフォームでジオコンプリート作業をしたいと思います。問題は、goecomplete に登録すると思われる要素が動的に挿入される html です。
function fetch_company_info (id) {
id = typeof id !== 'undefined' ? id : 0;
$.ajax({
type: "POST",
url: "fetch_company_info.php",
data: { id : id },
success: function(msg) {
$('#company_info_container').html(msg); //html of .geocomplete element is generate here
$(".geocomplete").geocomplete({ //this does not work
country: "CA"
});
}
})
}