HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers85/dale-int.com/wwwroot/js/parallax.js
/*// PARALLAX -/- FLOATING BLOCK

var distance = $('.about-floating-block').offset().top,
    $window = $(window);

$window.scroll(function() {
    if ( $window.scrollTop() + $(window).height() >= distance && $(window).width() >= 900 ) {
        // If the floating box hits the bottom of the viewport

        // current window scrollTop position
        $x = $window.scrollTop()

        // Animate the block vertically when scrolling the page
        $('.about-floating-block').animate({
            bottom: $x/12.5 + 'px'
        },0);
    }
    else{
        $('.about-floating-block').css({
            bottom: '0px'
        },0);
    }
});*/

// PARALLAX -/- IMAGE BACKGROUND

var distance = $('.image-background').offset().top,
    $window = $(window);

$window.scroll(function() {
    if ( $window.scrollTop() + $(window).height() >= distance && $(window).width() >= 900 ) {
        // If the floating box hits the bottom of the viewport

        // current window scrollTop position
        $x = $window.scrollTop()

        // Animate the block vertically when scrolling the page
        $('.image-background').animate({
            'background-position-x': -$x/4.5 + 'px'
        },0);
    }
    else{
        $('.image-background').animate({
            'background-position-x': 0 + 'px'
        },0);
    }
});