Merge pull request #1349 from nervetattoo/docs-advocate-proper-el-usage

Advocate proper usage of $el over $(this.el) in documentation
This commit is contained in:
brad dunbar
2012-05-25 16:42:02 -07:00

View File

@@ -2302,7 +2302,7 @@ ui.Chapter = Backbone.View.extend({
<pre>
var Bookmark = Backbone.View.extend({
render: function() {
$(this.el).html(this.template(this.model.toJSON()));
this.$el.html(this.template(this.model.toJSON()));
return this;
}
});
@@ -2334,7 +2334,7 @@ var Bookmark = Backbone.View.extend({
<b class="header">remove</b><code>view.remove()</code>
<br />
Convenience function for removing the view from the DOM. Equivalent to calling
<tt>$(view.el).remove();</tt>
<tt>view.$el.remove();</tt>
</p>
<p id="View-make">
@@ -2405,7 +2405,7 @@ var DocumentView = Backbone.View.extend({
},
render: function() {
$(this.el).html(this.template(this.model.toJSON()));
this.$el.html(this.template(this.model.toJSON()));
return this;
},