Permalink
Browse files

updated View#make to use Backbone.$ exclusively

  • Loading branch information...
1 parent 323d216 commit 14d124a5774e3755d5f71f00afa7956dc47eee89 @tbranyen tbranyen committed Dec 26, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 backbone.js
View
@@ -1281,10 +1281,10 @@
// var el = this.make('li', {'class': 'row'}, this.model.escape('title'));
//
make: function(tagName, attributes, content) {
- var el = document.createElement(tagName);
- if (attributes) Backbone.$(el).attr(attributes);
- if (content != null) Backbone.$(el).html(content);
- return el;
+ var $el = Backbone.$("<" + tagName + "/>");
+ if (attributes) $el.attr(attributes);
+ if (content != null) $el.html(content);
+ return $el[0];
},
// Change the view's element (`this.el` property), including event

0 comments on commit 14d124a

Please sign in to comment.