I have a d3 selection upon which I have defined event callbacks.
var obj = d3.select("#kk").on("mouseleave",function(){
console.log("mouse leave");
});
How can I trigger the event externally? Is there something like:
obj.mouseleave(); // actuall mouse leave function calling
If there is, and if I select the object without referring to obj
, will the trigger still work?
As in:
var newObje=d3.select("#kk");
newObje.mouseleave(); //will this trigger the previously defined instructions