Skip to content

Instantly share code, notes, and snippets.

Created July 30, 2013 10:42
Show Gist options
  • Save anonymous/6111931 to your computer and use it in GitHub Desktop.
Save anonymous/6111931 to your computer and use it in GitHub Desktop.
{
"libraries": [
"d3",
"d3.chart",
"d3.hexbin"
],
"mode": "javascript",
"layout": "fullscreen mode (vertical)",
"resolution": "reset"
}
/* css goes here */
.foo {
border: 1px solid red;
display: inline-block;
opacity: 0.5;
}
<!-- html goes here -->
<div class="foo">lorem ipsum</div>
/* javascript goes here */
d3.select("body").style("color", "black");
var $foo =d3.selectAll(".foo");
$foo.style('opacity', 1);
$foo.on("click", function() {
d3.select("body").transition()
.ease(Math.sqrt).style("color", "red");
/*
d3.select(this)
.transition()
.style('opacity', 1);
*/
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment