Skip to content

Can't get this to scroll to the correct position in an iframe #5

Description

@frumbert

I'm trying, from the parent document, to scroll an iframe smoothly to a particular position of an id. the iframe doesn't have jquery in it, but the parent does, so from the parent I'm

$("my-iframe").contents().find("#" + ref).scrollIntoView();

where "ref" is the id I want to scroll to.

The position of the scroll appears to take into account the offset of the iframe from the top of the parent document, not consider the iframe its own window??

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions