D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
NelsonMinar
Full window
Github gist
D3 id selection example
<!DOCTYPE html> <html><head><script type="text/javascript" src="https://github.com/mbostock/d3/raw/master/d3.js"></script></head><body> <script lang="text/javascript"> window.onload = function() { // Create a red rectangle d3.select("body").append("svg:svg") .attr("width", "100").attr("height", "100") .append("svg:rect") .attr("id", "myrectangle") .style("fill", "red") .attr("width", "100").attr("height", "100"); // Now turn the rectangle blue, via an ID selector setTimeout(function() { d3.selectAll("#myrectangle").style("fill", "blue"); }, 2000); } </script></body></html>
https://github.com/mbostock/d3/raw/master/d3.js