marcysutton/reveal-a11y

jQuery .on() Event Handlers being lost

Closed this issue · 3 comments

I have a bunch of jQuery .on() event handlers attached to video and audio in my presentation, but it looks like those are getting lost when this plugin is running. Sadly, unlike click handlers, video and audio handlers like onended don't have any sort of bubbling, so I can't use delegation.

I'll confess I don't entirely understand how the plugin works, but I'm trying to work my way through it to come up with a solution.

As a short term fix, I've added a callback function to the dependency that will run all my event handlers.

I bet they're getting lost because the DOM structure changes. What element(s) in the DOM are you binding to? Can you delegate through a slide wrapper element that stays put?

Closing due to inactivity.