Skip to content

Commit

Permalink
Advocate proper usage of $el over $(this.el) in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nervetattoo committed May 25, 2012
1 parent 201373a commit f222360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ <h2 id="View">Backbone.View</h2>
<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;
}
});
Expand Down Expand Up @@ -2334,7 +2334,7 @@ <h2 id="View">Backbone.View</h2>
<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">
Expand Down Expand Up @@ -2405,7 +2405,7 @@ <h2 id="View">Backbone.View</h2>
},

render: function() {
$(this.el).html(this.template(this.model.toJSON()));
this.$el.html(this.template(this.model.toJSON()));
return this;
},

Expand Down

0 comments on commit f222360

Please sign in to comment.