Skip to content

Instantly share code, notes, and snippets.

@joneath
Created January 26, 2012 00:40
Show Gist options
  • Save joneath/1680049 to your computer and use it in GitHub Desktop.
Save joneath/1680049 to your computer and use it in GitHub Desktop.
var MyView = new Backbone.View.extend({
render: function() {
$(this.el).html(this.template());
}
});
// In real code, use DOM element
new MyView({el: $(“#my_target”)});
// In test code, use in memory element
new MyView();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment