Commit 9562ff6a authored by imac's avatar imac

[Bugfix]Redmine #721 : Scroll image cover

parent 8cdefe57
......@@ -581,19 +581,20 @@ $(items).each(function () {
var refElement = $(currLink.attr("href"));
//console.log(currLink);
if (refElement.length && refElement.position().top - ( $(".main").outerHeight() / 2 - titleHeight - $(".footer").outerHeight() ) <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
if ( timer ) clearTimeout(timer);
timer = setTimeout(function(){
$('.subcat a').removeClass("active");
currLink.addClass("active");
if ($('nav ul ul').find('li.active')){
$('nav ul li').removeClass('current').addClass('off');
parent = currLink.parent().parent().parent();
parent.addClass('current').removeClass('off');
$('.phototheque .off .subcat').stop().slideUp();
parent.find('ul').stop().slideDown();
if ( timer2 ) clearTimeout(timer2);
timer2 = setTimeout(function(){
$('.phototheque .off .subcat').stop().slideUp();
parent.find('ul').stop().slideDown();
}, 330);
}
}, 330);
}
else{
currLink.removeClass("active");
......@@ -660,6 +661,7 @@ $(window).load( function() {
})
});//END document load
var timer;
var timer2;
$(window).scroll(function(e) {
onScroll(e);
var elem = $('.home-down-wrapper');
......
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