Skip to content

Instantly share code, notes, and snippets.

@campreb
Created September 12, 2013 22:12
Show Gist options
  • Save campreb/6544535 to your computer and use it in GitHub Desktop.
Save campreb/6544535 to your computer and use it in GitHub Desktop.
Enable AddressFinder in a Backbone View
FormView = Backbone.View.extend({
template: JST["form_template"],
render: function() {
$(this.el).html(this.template(this.model));
var address_input = $("input[name='address']", this.el)[0];
this.widget = new AddressFinder.Widget(address_input, "API_KEY");
return this.el;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment