D3 color change on mouseover using classed(“active”,true)
问题 I'm new to js and D3. I've generated a heatmap of-sorts and would like to change the color of a tile using D3's on.mouseover. I'm able to change the color explicitly but want to use a CSS active rule. Probably something simple to fix. Any help would be greatly appreciated. The full code is below. Thanks. <!DOCTYPE html> <meta charset="utf-8"> <head> <script src="http://d3js.org/d3.v3.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>