Skip to content

Instantly share code, notes, and snippets.

$(function() {
$("#app").select2({
ajax: {
url: "/dashboard/api/1/apps",
dataType: 'json',
delay: 250,
// the first parameter passed into this
// function is a direct reference to the "term" from the select2
// search box so you don't need to add params.term.
data: function (params) {