Commit 18d93f20 authored by Étienne Oz's avatar Étienne Oz 🖖

hoveredOffscree = fonctionnel en haut en bas partout partout

parent ae69006e
......@@ -62,17 +62,26 @@ function hoveredOffscreen(el, elToAct){
var thisOffset = $(this).offset().top;
var windowH = $(window).height();
if (thisOffset > windowH) {
// if (elToAct.attr('id') == 'blog') {
elToAct.addClass('bottom');
if (elToAct.attr('id') == 'blog') {
elToAct.css({'box-shadow': 'white 0px -40px 40px -40px inset'});
// } else {
// elToAct.css({'box-shadow': 'blue 0px -40px 40px -40px inset'});
// }
}
if (thisOffset < 0) {
} else {
if (elToAct.hasClass('top')) {
elToAct.css({'box-shadow': 'blue 0px 40px 40px -40px inset'});
elToAct.children('.simplebar-scroll-content').css({'box-shadow': 'blue 0px -40px 40px -40px inset'});
} else {
elToAct.css({'box-shadow': 'blue 0px -40px 40px -40px inset'});
}
}
} else if (thisOffset < 0) {
elToAct.addClass('top');
if (elToAct.attr('id') == 'blog') {
elToAct.css({'box-shadow': 'white 0px 40px 40px -40px inset'});
} else {
elToAct.css({'box-shadow': 'blue 0px 40px 40px -40px inset'});
if (elToAct.hasClass('bottom')) {
elToAct.children('.simplebar-scroll-content').css({'box-shadow': 'blue 0px -40px 40px -40px inset'});
}
}
}
})
......@@ -88,6 +97,8 @@ function hoverProjet(article, nav){
}
}, function(){
nav.find('.categorie').children('li').removeClass('hovered');
nav.removeClass('top bottom');
nav.find('.simplebar-scroll-content').css({'box-shadow': 'none'});
$('#nav').css({'box-shadow': 'none'});
})
}
......@@ -116,6 +127,8 @@ function listStates(nav){
}
}, function(){
var theClass = $(this).attr('class').split(' ')[0];
article.removeClass('top bottom');
article.find('.simplebar-scroll-content').css({'box-shadow': 'none'});
articleState(theClass, article, 'unhovered');
})
}
......@@ -134,6 +147,7 @@ function articleState(theClass, article, state){
} else if ($(this).hasClass(theClass) && state == 'unhovered'){
$(this).removeClass('behindHover');
$('.content').css({'box-shadow': 'none'});
$('.content .simplebar-scroll-content').css({'box-shadow': 'none'});
}
})
}
......@@ -159,7 +173,6 @@ function goGoMaso(){
function masoFallback(article){
if (article.last().css('top') == '0px') {
console.log('neinnein');
goGoMaso();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment