Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created August 13, 2015 16:24
Show Gist options
  • Save LinzardMac/55fe293a14271d9ace94 to your computer and use it in GitHub Desktop.
Save LinzardMac/55fe293a14271d9ace94 to your computer and use it in GitHub Desktop.
/**
* @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining
*/
render: function() {
var compat = this.model.get('compat');
if ( ! compat || ! compat.item ) {
return;
}
this.$el.empty().append(this.$el);
this.views.detach();
//i think the use of .html might be part of the problem?
this.$el.html( compat.item );
// this.views.delegateEvents(); <`` tosses delegateEvents() not defined error
this.views.render();
//console.log(this);
return this;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment