Event that identifies trigger of another event?

0

I have a jQuery event that comes from a framework, and I need to trigger a specific event at the end of the trigger for this event that is not planned.

It would look something like this:

Framework event

var evento = function() {
    $(document).on('click','.btn',function(){
       //Faz algo
       return response;
    })
}

Event that marks the previous shot, the shot is hypothetical, but what it will do is just that:

$(document).on('eventoFoiDisparado','evento',function(){
    $('.fiscal-target-close').trigger('click');
})

I know I can use eventListener , but I've never needed it before, and I'm not able to apply because the framework event in question is a universal event, ie it will fire in many different places, and I need one specific situation.

NOTE: This framework event is within function started with .init .

NOTE: The event I want to fire when firing the other event is unrelated to any other function, it is only to correct a response display problem.

    
asked by anonymous 03.10.2017 / 22:28

0 answers