Skip to content

Instantly share code, notes, and snippets.

@jccovey
Created May 27, 2010 18:08
Show Gist options
  • Save jccovey/416135 to your computer and use it in GitHub Desktop.
Save jccovey/416135 to your computer and use it in GitHub Desktop.
$(function(){
$(".texbox").autocomplete("/Services/DataService.svc/GetOptions", {
dataType: 'json',
parse: function(data) {
var items = data.d;
var parsed=[];
for(var i=0;i<items.length;i++)
parsed[i] = {
data: [items[i]],
value: items[i],
result: [items[i]]
};
return parsed;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment