Files
dev-epau.archi.fr/user/themes/epau-antimatter/js/antimatter.js
T
2021-03-29 16:48:47 +02:00

40 lines
909 B
JavaScript

var isTouch = window.DocumentTouch && document instanceof DocumentTouch;
function scrollHeader() {
// Has scrolled class on header
var zvalue = $(document).scrollTop();
if ( zvalue > 75 )
$("#header").addClass("scrolled");
else
$("#header").removeClass("scrolled");
}
jQuery(document).ready(function($){
// paralax
$('.parallax-window').parallax({imageSrc: '{/pages/02._programmes/10361_web_01.jpg}'});
// ON SCROLL EVENTS
if (!isTouch){
$(document).scroll(function() {
scrollHeader();
});
};
// TOUCH SCROLL
$(document).on({
'touchmove': function(e) {
scrollHeader(); // Replace this with your code.
}
});
//Smooth scroll to top
$('#toTop').click(function(){
$("html, body").animate({ scrollTop: 0 }, 500);
return false;
});
// Responsive Menu
});