I am trying to debug my problem. I have imported a library that will extract YouTube URLs from a playlist. Once this library is finished the extraction process, it will fire an event with $(document).trigger('playlistDone');. I then listen for the event via:
$(document).on('playlistDone', function() {
alert( 'done' );
});
I never receive the alert though. My website is currently massive, so it is difficult to debug. I have verified that the library is indeed working by creating a blank page, and the library does indeed fire off the trigger. This leads me to believe something on my site is causing the problem.
I have also done:
$(document).on('click', function() {
alert( 'done' );
});
to verify that default events are not disabled. My next step is to determine if somehow custom events are disabled.
To note, my website is using Bootstrap and Twig. I pray that they are not responsible for my issue.
Hard to tell without seeing more source code, but one way to find out if the event has been registered is to check the events data object.
Example
JS