jquery autocomplete with ajax and multiple categories not working -
i trying makeout jquery autocomplete http://jqueryui.com/autocomplete/#remote-jsonp remote json, categories
http://jqueryui.com/autocomplete/#categories .
the remote json not working in jquery example. loading spinner indefinitely. wrong ?
how combine remote json category ? have tried unsucessful. example not working.
the jquery ui example
the remote jsonp datasource autocomplete example not working, because geonames.org webservice has changed since example has been written.
perform request http://ws.geonames.org/searchjson , json containing following message:
please add username each call in order geonames able identify calling application , count credits usage.
when example written, anonymous call accepted no more case.
autocomplete : remote source + categories
just combine 2 jquery ui examples:
// 1. extends jquery ui autocomplete widget manage categories $.widget("custom.catautocomplete", $.ui.autocomplete, { _rendermenu: function(ul, items) { ... } } // 2. initialize widget using remote // data source , define each item category $(...).catautocomplete({ source: function(request, response) { $.ajax({ url: '...', success: function(data) { response($.map(data.data, function(item) { return { value: item.value, label: item.label, category: item.category } })); } } } });
i wrote jsfiddle example. retrieves github repositories of requested user , list them grouped forks count.
Comments
Post a Comment