[Pkg-javascript-commits] [backbone] 01/09: Adding View#remove.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:59:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.3.1
in repository backbone.

commit b38e9167c7c0247485b46cdec36f8fbe761bd5d2
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Thu Nov 11 09:44:38 2010 -0500

    Adding View#remove.
---
 backbone.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backbone.js b/backbone.js
index 083d3da..fa7836a 100644
--- a/backbone.js
+++ b/backbone.js
@@ -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.
     //

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list