Skip to content

Instantly share code, notes, and snippets.

@dust3d
Created December 15, 2010 21:29
Show Gist options
  • Save dust3d/742638 to your computer and use it in GitHub Desktop.
Save dust3d/742638 to your computer and use it in GitHub Desktop.
function card_select(e, card) {
document.getElementById("card_type").value = card;
var cards = document.getElementsByTagName("dl");
for (x = 0; x < cards.length; x++) {
if (cards[x].className == "selected")
cards[x].className = "";
}
e.className = "selected";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment