Skip to content

Instantly share code, notes, and snippets.

@tuttelikz
Last active April 24, 2018 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuttelikz/021b4bcdd3507a69a82e1092cd52a7e5 to your computer and use it in GitHub Desktop.
Save tuttelikz/021b4bcdd3507a69a82e1092cd52a7e5 to your computer and use it in GitHub Desktop.
a way to choose specific li element
<script>
d3.select("li:nth-child(2n)").style("color", "red"); # second
d3.select("li:nth-child(even)").style("color", "red"); # even
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment