score:1

Accepted answer

I change a bit of your code

function emananting(index) {
    console.log(index)
    emanatingCircles[index]
        .transition().duration(5000)
        .attr('opacity', 0)
        .attr('r', 20)
        .transition().duration(0)
        .attr('opacity', 0)
        .attr('r', 5)
        .each("end", (index)=> emanating(index)); // pass in a emananting function
    emanatingCircles[index].attr("opacity", 1);
} 

I guess you should pass a function to .each("end",...)


Related Query

More Query from same tag