2
0

Add fallback in case the video doesn't work.

This commit is contained in:
Maarten Billemont
2014-10-06 23:30:41 -04:00
parent 480e7f192a
commit 979d3a2a5a
5 changed files with 40 additions and 7 deletions

View File

@@ -4,6 +4,13 @@ $(function(){
window.onscroll = function() {
document.getElementById("scrollDown").style.opacity = Math.max(0, 200 - window.scrollY) / 200;
};
if (document.location.hash == "#video")
toggleMovie();
$("video")[0].addEventListener("playing", function() {
$(this).parents().find(".fallback").hide();
}, true);
});
function toggleMovie() {