Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Convert html into correct element
- * @param html
- */
- html2element:function(html) {
- var $template, attributes = {},
- template = html;
- $template = $(template(this.model.toJSON()).trim()), _.each($template.get(0).attributes, function(attr) {
- attributes[attr.name] = attr.value
- }), this.$el.attr(attributes).html($template.html()), this.setContent(), this.renderContent()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement