Skip to content

Instantly share code, notes, and snippets.

View darrin-wortlehock's full-sized avatar

Darrin Wortlehock darrin-wortlehock

View GitHub Profile
@darrin-wortlehock
darrin-wortlehock / Backbone.View.Autocomplete.js
Created September 1, 2011 22:27 — forked from marksteve/Backbone.View.Autocomplete.js
Backbone View for jQuery UI Autocomplete inputs
var Autocomplete = Backbone.View.extend({
initialize: function(options) {
options = _.extend({}, options);
_.bindAll(this, 'refresh');
// Input element
this.input = options.input;
// Choices collection
this.choices = options.choices;
// Selected collection
this.selected = options.selected;