I\'m trying to wrap my head around this concept.
Can you dumb this down for me and maybe provide a simple example of the difference between the el:
attribu
var View = Backbone.View.extend({
tagName: 'span',
id: 'identity',
class: 'classy',
el: $(this.tagName), // or
el: $('<' + this.tagName + ' />', {
id: this.id, // identity
'class': this.class // classy
}) // this is jQuery shorthand for building an element fyi
});
var view = new View();
I think that should work fine.