Skip to content

Instantly share code, notes, and snippets.

@muhqu
Created March 2, 2011 14:51
Show Gist options
  • Save muhqu/851043 to your computer and use it in GitHub Desktop.
Save muhqu/851043 to your computer and use it in GitHub Desktop.
function postElem(post) {
var itemEl = $('<div class="item"><div class="image"><a><span class="img"><img></span></a><span class="txt"/></div></div>');
itemEl.attr('id', 'post-'+post.id);
itemEl.find('.image a').attr('href',S3_URL+"/"+post.id+"-m800le.jpg");
itemEl.find('.image img').attr('src',S3_URL+"/"+post.id+"-75se.jpg");
itemEl.find('.image .txt').text(post.caption || '');
return itemEl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment