Skip to content

Instantly share code, notes, and snippets.

@tpai
Last active August 29, 2015 14:10
Show Gist options
  • Save tpai/6551553ceeced2134bda to your computer and use it in GitHub Desktop.
Save tpai/6551553ceeced2134bda to your computer and use it in GitHub Desktop.
ludum dare 31 compo entries I ever played
var arr = []
var imgsrc, ahref, itext
$.each($("table").last().find("i,a,img"), function (key, val) {
if(key % 3 == 0)
imgsrc = $(val).prop("src")
else if(key % 3 == 1)
ahref = $(val).prop("href")
else if(key % 3 == 2) {
itext = $(val).text()
arr.push("![]("+imgsrc+") ["+itext+"]("+ahref+")")
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment