Skip to content

Instantly share code, notes, and snippets.

@romaimperator
Created June 23, 2012 02:47
Show Gist options
  • Save romaimperator/2976452 to your computer and use it in GitHub Desktop.
Save romaimperator/2976452 to your computer and use it in GitHub Desktop.
document.getElementById("button_to_click").addEventListener("click", function anon(event) {
this.removeEventListener("click", anon, false);
var mobi_button = document.getElementById("element_to_append_to");
var new_div = document.createElement("div");
new_div.appendChild(document.createTextNode("Please wait while we prepare the book for you."));
mobi_button.appendChild(new_div);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment