Stop video from slider when slide to a new slider
Mon Jan 17 2022 12:42:40 GMT+0000 (Coordinated Universal Time)
Saved by @kevinazoulay #javascript
The outer function inside $(); makes sure the code runs after the entire page was loaded The observer is a MutationObserver, which can detect when an HTML element's attribute has changed. when the correct one has changed (aria-hidden), run the code to reset the youtube video Let Player: This gets the iframe element and with a trick, it reloads the "src" attribute
Comments