The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

yuchsiao (7) [Avatar] Offline
#1
Hi Elijah,

I think there are two typos in this part. The snippet
````
.each(function(d,i) {....
````

is supposed to be
````
.each(function(p) {...
````

and at the end of the same page:
````
.classed("highlight", false)
````
is supposed to be
````
.classed("active", false)
````
I'm not sure if the second one is your intention.


Besides, for this part of code to work, we need to remove other styles specified by .style (e.g. .style("font-size", "10px") and .style("fill","pink") ) , which may take a higher priority than classes specified through .classed function and would appear no response when moving mouse around. It is helpful if you mention this explicitly.

Another point: it is useful for learners to identify which are from d3.js and which are DOM built-in's. For instance, .parentElement and .appendChild() are from DOM, .forEach() is from JavaScript Array, and .each() is from d3.js.

Happy Writing!
elijah.meeks (127) [Avatar] Offline
#2
Re: 3.2.3 typos and one suggestion
Thanks so much for catching these, and I'll try to be more clear about core JavaScript vs. D3 functions.