D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mbostock
Full window
Github gist
D3 and Custom Data Attributes
<!DOCTYPE html> <meta charset="utf-8"> <ul id="list"> <li data-username="shawnbot">Shawn Allen</li> <li data-username="mbostock">Mike Bostock</li> </ul> <script src="//d3js.org/d3.v3.min.js"></script> <script> d3.selectAll("#list li") .datum(function() { return this.dataset; }) .sort(function(a, b) { return d3.ascending(a.username, b.username); }); </script>
https://d3js.org/d3.v3.min.js