D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
simulando tabs (con botones) usando d3.js
<!DOCTYPE html> <html> <head> <script src="https://d3js.org/d3.v3.min.js"></script> <meta charset=utf-8 /> <title>tabs</title> </head> <body> <button type="button" id="b1">tab 1</button> <button type="button" id="b2">tab 2</button> <div id='uno'>primer tab</div> <div id='dos'>segundo tab, mejor usá --> <a href="https://jqueryui.com/tabs/">jquery tabs</a></div> <script> d3.select("#uno").style("display", "block"); d3.select("#dos").style("display", "none"); d3.select('#b1').on('click', function() { d3.select("#uno").style("display", "block"); d3.select("#dos").style("display", "none"); }); d3.select('#b2').on('click', function() { d3.select("#uno").style("display", "none"); d3.select("#dos").style("display", "block"); }); </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js