Skip to content

Instantly share code, notes, and snippets.

@pavelk2
Created May 10, 2013 17:58
Show Gist options
  • Save pavelk2/5556179 to your computer and use it in GitHub Desktop.
Save pavelk2/5556179 to your computer and use it in GitHub Desktop.
if (options.show_media) {
if (element.attachments) {
$.each(element.attachments,function(index){
console.log(this);
if (this.type == 'video')
post.attachment = '<img class="attachment" src="' + this.video.image_big + '" />';
if (this.type == 'photo'){
console.log(this.photo.src_big);
post.attachment = '<img class="attachment" src="' + this.photo.src_big + '" />';
}
//if (this.type == 'link')
//post.attachment = '<img class="attachment" src="' + this.link.image_src + '" />';
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment