using forEach funtion in javascript/jquery and d3
by rajesh[ Edit ] 2014-06-01 21:33:45
forEach function is a native javascript function and can be used on d3 selections too.
Both the below codes are correct and will work.
in jquery
$("#div").style("fill",function(d){ return "red"; });
in d3.js
d3.selectAll("%div").style("fill",function(d){ return "red"; });