var growVideo=document.getElementById("videogrow");
var makeVideo=document.getElementById("videomake");
var videoList=['mikethefrog.mp4','mikethefrog.mp4'];
var index = videoList.indexOf(window.currentVideoName);
var growLearnButton = document.getElementById("growLearn");
var growLearnCloseButton = document.getElementById("growLearnClose");
var growDoButton = document.getElementById("growDo");
var growDoCloseButton = document.getElementById("growDoClose");
var makeLearnButton = document.getElementById("makeLearn");
var makeLearnCloseButton = document.getElementById("makeLearnClose");
var makeDoButton = document.getElementById("makeDo");
var makeDoCloseButton = document.getElementById("makeDoClose");
//Next button
function nextButton(){
growVideo.pause();
growVideo.currentTime=0;
index = index + 1;
if(index==videoList.length)
index = 0;
alert(videoList[index]);
growVideo.src = 'videos/'+videoList[index];
window.currentVideoName=videoList[index];
growVideo.play();
}
function playPause()
{
if (growVideo.paused)
growVideo.play();
else
growVideo.pause();
}
//DOC2
//Next button
function nextButton(){
makeVideo.pause();
makeVideo.currentTime=0;
index = index + 1;
if(index==videoList.length)
index = 0;
alert(videoList[index]);
makeVideo.src = 'videos/'+videoList[index];
window.currentVideoName=videoList[index];
makeVideo.play();
}
function playPause2()
{
if (makeVideo.paused)
makeVideo.play();
else
makeVideo.pause();
}
//GrowLearnMoreGuide
// Event listener for the guide buttons
growLearnButton.addEventListener("click", function() {
if (growVideo.paused == true) {
// Play the video
growVideo.play();
// Update the button text to 'Pause'
growLearnButton.innerHTML = 'Grow: Learn More';
} else {
// Pause the video
growVideo.pause();
// Update the button text to 'Play'
growLearnButton.innerHTML = 'Grow: Learn More';
}
});
// Event listener for the close buttons
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.