Skip to content

Instantly share code, notes, and snippets.

@sjungling
Created May 6, 2015 20:01
Show Gist options
  • Save sjungling/eef791b65bf91a3a2bd4 to your computer and use it in GitHub Desktop.
Save sjungling/eef791b65bf91a3a2bd4 to your computer and use it in GitHub Desktop.
var SearchForm = Backbone.View.extend({
template: Handlebars.compile($('#search-template').html()),
options: {
buttonType: 'default',
method: 'GET',
value: null
},
initialize: function(options) {
_.extend(this.options,options);
this.render();
},
render: function() {
this.$el.html(this.template(this.options));
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment