jquery dynamic elements

Опубликовано: 29 Сентябрь 2024
на канале: optikalefx
2,540
4

So this is an extension of the last video. In the last video we made a flash video player that knows what file to play based on the url. So here we make links that will load the page to play the video.

However, we do this in a unique way. We will make it so all we have to do is add a class and a video attribute to any tag, and then it will have a special video button show up next to it.

So we use jquery to quickly get all elements with a particular class, and then add the image, style it, and add the click event so that it takes you to the right video.