I have a conundrum and i don't know how to solve it. Let's say i have a jquery click event bellow (which is in Script A).
$selector.on('click', function(e) {
// 30 lines of code [it doens't matter what it does]
});
Now i want to call function MyFunction()
when that click event fires.
Now the tricky bit, MyFunction()
is in Script B (which is loaded after Script A).And it should be executed right after the click event is handled and not after the 30 lines of code inside it have been executed.
Naturally, editing Script A is out of the question since it's a 3rd party lib.
If i didn't explain it properly i can upload a flow chat.