I have a page with 3 videos. When you click a video, it opens in a Modal, and clicking away closes the video. Cool.
There is CSS to position the video and draw where you have to close it. Then there is the Javascript file, which reads all the class names and creates the clicking for opening and closing the video. Currently, I need a chunk of classes named 001, 002, 003... linking to an equal number of JavaScript files, which have also been edited with these new names and the video links. Because the class IDs will all have to be different with in the same HTML file, I will also need additional code in the style sheet despite it all being identical except for the names.
This page is going to have 30 or more videos..
I know that stack Overflow is for tweaking each other's code, but if you could at least point me in the right direction that would be very helpful indeed.
I am looking for a way to make a list of YouTube videos, and attach them to links so that only one CSS script is needed to style all of them at the same time, and only one Javascript file is needed to play all of them the same way.
What I need (I think), is the method in JavaScript for grabbing a string that was clicked on, and putting that into a chunk of code, then displaying the associated video.
So if I click on video #12, the JS would display a Modal containing youtube*com/embed/(video#12)/.
Another example is a guy in the projection room of a theater plays 8 different videos, vs 8 guys that each show 1.