Skip to content

Parallax elements jump after initial scroll #61

@philipgunther

Description

@philipgunther

At a scroll position of 0 the parallax effect is not active. Only when you scroll, the CSS rules are applied. This causes the parallax elements to jump unexpectedly. The following modified code (dist/jquery.paroller.js, line 191) resolves this issue.

$(window).on('load scroll', function () {
                var scrolling = $(this).scrollTop();
                var scrollTop = $(document).scrollTop();

                // if (scrollTop === 0) {
                    // factor = 0;
                // } else {
                    factor = setMovement.factor($this, width, options);
                // }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions