WP PLUGIN
・選択カスタムフィールドをオートコンプリートに変更
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
jQuery(function ($) {
|
||||
$('#select-custom-field-input').autocomplete({
|
||||
source: function (req, resp) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: localize.ajax_url,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: localize.action,
|
||||
param: req.term
|
||||
}
|
||||
}).done(function (o) {
|
||||
resp(o);
|
||||
}).fail(function () {
|
||||
resp(['']);
|
||||
});
|
||||
},
|
||||
autoFocus: true,
|
||||
minLength: 2
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user