mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Adding View#remove.
This commit is contained in:
@@ -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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user