/* json data*/
[{"id":"COL000001","label":"Emirates College of Technology- UAE","value":"COL000001"},
{"id":"COL000002","label":"Al Khawarizmi International College- UAE","value":"COL000002"},
{"id":"COL000003","label":"Syscoms College","value":"COL000003"},
{"id":"COL000004","label":"Abounajm Khanj Pre-Uni Center","value":"COL000004"},
{"id":"COL000005","label":"Advanced Placement","value":"COL000005"},
{"id":"COL000006","label":"Al Buraimi College (Uni Clge)","value":"COL000006"},
{"id":"COL000007","label":"Al-Ain Community College","value":"COL000007"},
{"id":"COL000008","label":"AMA Computer College","value":"COL000008"},
{"id":"COL000009","label":"Arab Academy for Bankg and Fin","value":"COL000009"},
{"id":"COL0000010","label":"ARABACDSCITECHMARTIMETRNS","value":"COL0000010"},
{"id":"COL0000011","label":"Arapahoe Community College","value":"COL0000011"},
{"id":"Other","label":"Other","value":"Other"}]
/* autocomplete start here*/
$.widget('custom.tableAutocomplete', $.ui.autocomplete, {
options: {
open: function (event, ui) {
// Hack to prevent a 'menufocus' error when doing sequential searches using only the keyboard
$('.ui-autocomplete .ui-menu-item:first').trigger('mouseover');
},
focus: function (event, ui) {
event.preventDefault();
},
highlightClass: "ui-state-highlight"
},
_create: function () {
this._super();
// Using a table makes the autocomplete forget how to menu.
// With this we can skip the header row and navigate again via keyboard.
this.widget().menu("option", "items", ".ui-menu-item");
},
_renderMenu: function (ul, items) {
var self = this;
var $li = $("<li>");
$table = $('<table class="table-autocomplete">'),
$thead = $('<thead>'),
$headerRow = $('<tr>'),
$tbody = $('<tbody>');
$.each(self.options.columns, function (index, columnMapping) {
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.