mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
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:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user