I want to highlight rows that meet a condition as well as highlight an html tab with an id #htmlTab using d3
my code looks like this:
d3.rows.style('background-color', function(d){
if(row meets condition){
document.querySelector("#htmlTab").style.color = "orange";
return 'orange'}
})
So at first d3 will highlight the rows if it meets the condition and then queryselector will color the #htmlTab. The problem I am having is that it is only changing the color of the the one tab that has the d3 table. I want it to color all the tabs that has an id #htmlTab on different pages as well. If this code is outside the d3.style function, it works for all the html tabs with that id: document.querySelector("#htmlTab").style.color = "orange";