Re-organize the project into a better hierarchy.
This commit is contained in:
25
public/site/2013-05/js/main.js
Executable file
25
public/site/2013-05/js/main.js
Executable file
@@ -0,0 +1,25 @@
|
||||
$(function(){
|
||||
$.stellar();
|
||||
|
||||
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() {
|
||||
if ($("header").hasClass("play")) {
|
||||
$("header").removeClass("play");
|
||||
$("header video")[0].pause();
|
||||
} else {
|
||||
$("header").addClass("play");
|
||||
$("header video")[0].play();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user