Skip to content

Scroll goes negative on margin #17

@apedretti

Description

@apedretti

When the parent doesn't have the height set (which with floating elements could happen), or when the height of the parent is smaller than the moving elem, the plugin comes with a negative margin.

To solve this, add this validation on the "getMargin" closure (line 63 on my version):
if(max < this.originalMargin)
max = this.originalMargin;

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