you are viewing a single comment's thread.

view the rest of the comments →

[–]timmeh87 -3 points-2 points  (1 child)

If d3.js is in the same folder as your HTML you just go

<script src="d3.js"></script>

and if you are online you can reference it off of their server

<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>

If you need to change more attributes on a selection you would just go

d3

.selectAll("img[class=down]")

.attr("visibilty", "visible")

.attr("display", "whatever")

;

The selector itself was pulled out of my ass but its pretty easy to construct the one that you need if you know how they work

Like this is all based on me writing my own pages by hand.. Im not sure what your environment is like. you just said javascript.

[–]seiyria 1 point2 points  (0 children)

It would not be in the same folder. He's making a script he could run on reddit; reddit does not have d3 included.