Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Documentation #52

Open
spencerthayer opened this issue Jul 2, 2015 · 0 comments
Open

Better Documentation #52

spencerthayer opened this issue Jul 2, 2015 · 0 comments

Comments

@spencerthayer
Copy link

You should expand your demo.js file into actual case examples. To exactly figure out how one uses please one has to reverse engineer your demo page. Not a big deal but not ideal.

var make_color_multiple = document.getElementById("make-color-multiple");
addEventListener(make_color_multiple, "click", function() {
  var e = document.getElementById("multiple-demo").getElementsByTagName("div");
  var t = Please.make_color({
    colors_returned: 4
  });
  for (var n = e.length - 1; n >= 0; n--) {
    remove_first_child(e[n]);
    e[n].style.background = t[n]
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant