I'm trying to write a function that changes text a div, using dot-chaining and D3.
I want to select my outer div, transition it's opacity to 0, select the inner div and change the text, and then transition the outer div back to 1. So the entire thing looks something like this:
d3.select("div#inner").transition().delay(200).text("This is the new text")
There's got to be a better way of doing this. Is there a way for me to combine these two selections? Ideally I would make this all one function and just call it accordingly.