I am in need of assistance with integrating multiple embedded YouTube videos (using iframes) that appear on the screen after a user clicks a custom button.
While there are solutions available for single videos, I am struggling to make it work for multiple videos on the same page.
The button is located within a series of uniform div elements across all the videos. Once the video pops up, clicking outside of it should close the modal.
The following code aims to identify the parent element after the button click and open the corresponding video modal, but unfortunately, nothing happens as expected.
Any guidance or support provided would be highly appreciated!