Skip to content

Commit

Permalink
Create index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AadiRealm111 authored Aug 29, 2020
1 parent ec42aae commit 5f85cf1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var video = document.getElementById('intro-video');
$('#play-video').click(function() {
if(video.paused) {
video.play();
playing=true;
video.controls=true;
$('#play-video').hide();
}
})
video.onended = function() {
$('#play-video').show();
video.controls = false;
}
video.onpause = function() {
$('#play-video').show();
video.controls = false;

0 comments on commit 5f85cf1

Please sign in to comment.