我想以我的形式进行地理完整工作。问题是假设向 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"
});
}
})
}