customID:5 のような URL にカスタム変数を送信したいのですが、このコードを追加するにはどうすればよいですか。Plz help
$("#e8").select2({
placeholder: "Search for another Concept",
minimumInputLength: 1,
multiple: true,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "sendchat3.php",
dataType: 'json',
data: function (term, page) {
return {
q: term, // search term
page: page
};
},
results: function (data, page) {
return { results: data};
}
}
});