コード
<input type="text" name="chara_name" value="" >
<input type="text" name="skill_name1" data-type="skill" value="" >
<input type="text" name="skill_name2" data-type="skill" value="" >
<input type="text" name="skill_name3" data-type="skill" value="" >
area.find('セレクタ1,セレクタ2').autocomplete({
source: function(request, response) {
const text = request.term;
const hit_list = [];
if(this.element.attr('name') === 'chara_name'){
処理
}
if(this.element.data('type') === 'skill') {
処理
}
response(hit_list);
},
autoFocus: true,
delay: 200,
minLength: 2
});