Skip to content

Instantly share code, notes, and snippets.

Last active February 9, 2016 01:04
What would you like to do?
Transition Speed Test
license: gpl-3.0
<!DOCTYPE html>
<meta charset="utf-8">
body {
width: 720px;
margin: 20px auto 20px auto;
#d3 {
outline: 1px red solid;
width: 720px;
overflow: hidden;
#d3 div {
width: 5px;
height: 5px;
background-color: white;
outline: 1px black solid;
float: left;
margin: 5px;
display: block;
<p><button id="click">Click me!</button> Built with <a href="">D3</a>. A response to Rich Bradshaw’s <a href="">jQuery <i>vs.</i> CSS transition speed test</a>.
<div id="d3"></div>
<script src="//"></script>
var div ="#d3").selectAll("div")
.data(d3.range(48 * 48))
.enter().append("div");"#click").on("click", function() {
.style("background-color", null)
.style("outline-color", null)
.style("background-color", "black")
.style("outline-color", "red");
Copy link

Nice, if I put d3.inlog on a transition it makes the example look like the jquery version because of the high overhead d3.inlog introduces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment