rf-web/assets/js/index.js
2020-04-25 11:36:07 +02:00

26 lines
737 B
JavaScript

"use strict";
(function () {
if (window && document) {
var sideTitles = document.querySelectorAll('.side-title');
// if(window.navigator && window.navigator.language === 'fr' && window.location) {
// window.location.replace('/fr')
// }
var handleScroll = function handleScroll() {
var logo = document.querySelector('#rf-logo');
if (window.scrollY > 100) {
// logo.classList.add('hidden');
sideTitles.forEach(title => title.classList.remove('hidden'));
} else {
// logo.classList.remove('hidden');
sideTitles.forEach(title => title.classList.add('hidden'));
}
};
handleScroll();
window.addEventListener('scroll', handleScroll);
}
})();