Skip to content

Instantly share code, notes, and snippets.

@kswlee
Created July 5, 2012 16:46
Show Gist options
  • Select an option

  • Save kswlee/3054754 to your computer and use it in GitHub Desktop.

Select an option

Save kswlee/3054754 to your computer and use it in GitHub Desktop.
function setup(items)
{
var divs = document.getElementsByTagName("div");
var images = document.getElementsByTagName("image");
var button = document.getElementsById("save-btn");
for (var i = 0; i < items.length; i++) {
process(items[i], div[i]);
}
button.addEventListener("click", function(event) {
alert("Saved");
}, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment