basically I'm trying to achieve this effect... http://www.vtcreative.fr panel scrolling over the content area.

I've tried to un-minify the js and work it out but struggling to do so!

Would I be right in thinking that the content div is a fixed position, once the the overlay (header) panel reaches to the top using scrollTop() this changes the content position to relative, allowing that to scroll?

Many thanks in advance for your help.

有帮助吗?

解决方案

Have a look here:

header.stop().addClass("overlay-active")
content.removeClass("active");

the complete code is:

function Scroll() {
    if(responsive_viewport >= 768) {
        var e = $(this).scrollTop();
        if(e < previousPos && e < 20) {
            body.removeClass("b-content-pos");
            content.removeClass("active");
            okScroll = 0;
            setTimeout(function () {
                loaderLogo.addClass("active")
            }, 500);
            setTimeout(function () {
                header.stop().delay(1e3).removeClass("overlay-active")
            }, 1e3);
            loaderLine.addClass("alt")
        }
....
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top