Skip to content

Instantly share code, notes, and snippets.

Last active February 9, 2016 01:12
What would you like to do?
license: gpl-3.0
<!DOCTYPE html>
<meta charset="utf-8">
<script src="//"></script>
var data = [
["A", "B", "C", "D", "E"],
["B", "C", "D", "A", "E"],
["C", "A", "D", "E", "B"],
["D", "A", "B", "E", "C"],
["E", "D", "B", "C", "A"]
var li ="ul").selectAll("li")
.text(function(d) { return d; })
.on("click", reorder);
function reorder(d, i) {
.data(data[i], function(d) { return d; })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment