var BoxView = Backbone.View.extend({
tagName: 'div',
className: 'color-box',
render: function() {
this.$el.html('Hello World!');
this.$el.hide();
return this;
}
});
var BodyView = Backbone.View.extend({
el: 'body'
});
var body = new BodyView();
var box = new BoxView();
body.$el.append(box.el);
box.render();
box.$el.show('slow');
.color-box {
width: 100px;
height: 100px;
background: #F00;
}