HEX
Server: Apache
System: Linux VM-16-7-centos 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.molinta.com/wp-content/themes/ink-context-blog/assets/js/background-change.js
/**
 *  banner background made fixed after scroll to top and vice versa
 */
function ink_context_blog_isElementInViewport(el) {
    var elementTop = el.offset().top;
    var elementBottom = elementTop + el.outerHeight();
    var viewportTop = jQuery(window).scrollTop();
    var viewportBottom = viewportTop + jQuery(window).height();
    return elementBottom > viewportTop && elementTop < viewportBottom;
}

jQuery(window).on(
    'scroll', function () {
        
        var ink_context_blog_targetclass4 = document.querySelector('.banner-author')
       
        if (ink_context_blog_targetclass4 != null) {
            var ink_context_blog_targetclass3 = jQuery('.banner-author');
            var ink_context_blog_divTop1 = jQuery('.banner-author').offset().top;
            if (jQuery(window).scrollTop() > ink_context_blog_divTop1) {
                if (ink_context_blog_targetclass3.length > 0) {
                    if (ink_context_blog_isElementInViewport(ink_context_blog_targetclass3)) {
                        jQuery(".banner-author .img-holder").css({ "background-attachment": 'fixed' });

                    } else {
                        jQuery(".banner-author .img-holder").css({ "background-attachment": 'scroll' });

                    }
                }
            } else {
                jQuery(".banner-author .img-holder").css({ "background-attachment": 'scroll' });

            }
        }
    }
);