Playing a video when you click
How do I make an playing a video when you click?
What is a playing a video when you click? How do you make a playing a video when you click? This script and codes were developed by Shaunalynn on 30 January 2023, Monday.
Playing a video when you click - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>playing a video when you click</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="card" id="card1"> <h2>click on the play button to play</h2> <video src="https://s3.amazonaws.com/kpomes/media/clifftop/flatfoot1.mov" controls> </video>
</div>
<div class="card" id="card2"> <h2>click anywhere in the pink box to play</h2> <video src="https://s3.amazonaws.com/kpomes/media/clifftop/flatfoot1.mov"> </video>
</div> <script src="js/index.js"></script>
</body>
</html>
Playing a video when you click - Script Codes CSS Codes
.card { float:left; padding:2em;
}
#card1 { background-color:#ccc;
}
#card2 { background-color:pink;
}
Playing a video when you click - Script Codes JS Codes
var card2 = document.getElementById('card2');
var card2vid = document.querySelectorAll('#card2 video')[0];
card2.addEventListener('click', function() { card2vid.play();
})
Developer | Shaunalynn |
Username | duffles |
Uploaded | January 30, 2023 |
Rating | 3 |
Size | 1,774 Kb |
Views | 2,024 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by shaunalynn | 1,736 Kb |
Shaunalynn Duffy | 2,651 Kb |
Linking a picture from github | 1,232 Kb |
Template Bio Page for Creative Coding | 2,594 Kb |
Alec Resnick | 2,177 Kb |
Molly Josephs | 2,527 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Commuter Line Tokyu 8500 | Pedox | 7,031 Kb |
Blockquote design | Sjmcpherson | 1,863 Kb |
Octopus Bar iPad App Interactions | Davidkpiano | 6,735 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 Kb |
A bit of elegance | Hackthevoid | 9,095 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
Drawing a Terminal with CSS | Lachlanjc | 3,185 Kb |
Simple search using AngularJS | Haykou | 1,802 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Angular Route | Arun_v606 | 1,837 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!