Created
March 27, 2015 11:26
-
-
Save itpcc/1fc9760d2de8a00f0631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fullpageOption = { | |
scrollOverflow: true, | |
onLeave: function(index, nextIndex, direction){ | |
var cntAllSlide = $("#fullpage .section").length; | |
console.log('From ->', index, 'to ->', nextIndex, 'All ->', cntAllSlide); | |
if(cntAllSlide > 4 && nextIndex >= cntAllSlide && index == cntAllSlide-1 && isCongreat && youtubePlayer && typeof youtubePlayer == "object" && typeof youtubePlayer.playVideo !== "undefined"){ | |
youtubePlayer.setVolume(30); | |
youtubePlayer.playVideo(); | |
isCongreat = false; | |
}else if(youtubePlayer && typeof youtubePlayer == "object" && typeof youtubePlayer.stopVideo !== "undefined"){ | |
youtubePlayer.stopVideo(); | |
//youtubePlayer.seekTo(0, true); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment