Skip to navigation
Simple jquery auto complete with a datasource from pouchdb and a forward
20.06.17
var db = new PouchDB('foo'); if(document.getElementById("code_autocomplete") != null ) { db.get('index_codes').then(function (doc) { jQuery( "#code_autocomplete" ).autocomplete({ source: doc['codes'], select: function(e,ui) { window.location="http://mylist.com/code/" + ui.item.value } }); }).catch(function (err) { console.log(err); }); }
http://api.jqueryui.com/autocomplete/#event-select
Reply
Anonymous
Information Epoch 1747241511
You can always add complexity.
Home
Notebook
Contact us