<title> Neurohackweek 2017 D3 Tutorial </title>
<p> This is a paragraph </p>
<a href="https://www.google.com"> here is a link </a>
<h3> My first bar graph with div elements</h3>
<div class="bar" style="width: 100px;">100</div>
<div class="bar" style="width: 150px;">150</div>
<div class="bar" style="width: 60px;">60</div>
<script src="js/d3.min.js"></script>
<script src="js/jquery.min.js"></script>
var newdiv = document.createElement("div");
newdiv.className = "bar";
newdiv.style.width = "80px";
newdiv.appendChild(document.createTextNode("80"));
document.body.appendChild(newdiv);
var myElements = document.getElementsByClassName("bar")
for (i=0; i<myElements.length; i++){
myElements[i].addEventListener("click", function(e){
e.target.style.background = "black" // change the style of the clicked element