using forEach funtion in javascript/jquery and d3

by rajesh 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"; });

Tagged in:

1126
like
0
dislike
0
mail
flag

You must LOGIN to add comments