I would like to call my callback
after all my transition
end. But I am getting no. of time of callback from each of the transition
end. How to combine all this and make a call back at the end?
Here is my code:
var fadeHandler = function() {
var myCallback = function() {
$.event.trigger('showMenu');
//this is called 6 times
// how to get single time call back after completing all 6 transitions?
}
d3.selectAll('.subAppGroup .subAppPath, .subAppGroup .subAppGroupDetail') //parent group 6 no.s
.transition()
.delay(function(d, i) {
return i * 500;
})
.duration(500)
.style('opacity', 1)
.each("end", myCallback); //this is called 6 times
}
fadeHandler();