Adding View#remove.

This commit is contained in:
Jeremy Ashkenas
2010-11-11 09:44:38 -05:00
parent 3fa14be5a1
commit b38e9167c7

View File

@@ -764,6 +764,13 @@
return this;
},
// Remove this view from the DOM. Note that the view isn't present in the
// DOM by default, so calling this method may be a no-op.
remove : function() {
$(this.el).remove();
return this;
},
// For small amounts of DOM Elements, where a full-blown template isn't
// needed, use **make** to manufacture elements, one at a time.
//