Skip to content

Instantly share code, notes, and snippets.

@mankutila
Created November 1, 2017 09:29
Show Gist options
  • Select an option

  • Save mankutila/3adda5e94d344c13e6007348f42a0c64 to your computer and use it in GitHub Desktop.

Select an option

Save mankutila/3adda5e94d344c13e6007348f42a0c64 to your computer and use it in GitHub Desktop.
Highlight random article on raindrop.io
var articles = document.querySelectorAll(".element"),
index = Math.round(Math.random() * (articles.length + 1));
articles[index].style.background = "lime";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment