Skip to content

Helper code to auto-expand widget iFrame #31

@dhedlund

Description

@dhedlund

Right now the events widget people can embed in their site is a fixed size and people will have to scroll inside the iFrame in order to see all events. It would be nice to make the iFrame automatically resize to fit its contents. In order to do this, it looks like there needs to be javascript code embedded both inside the iFrame and on the parent site.

We should be able to include a little bit of javascript code along with the iFrame embed code, which most people would be okay copying and pasting to their site; anything more complicated (them hosting a separate .js file) will probably not work. Many examples I've seen use jQuery and we can't assume all sites will have it available to use.

As a starting point, check out the following StackOverflow questions:

Note that we don't really care about dynamically controlling the width of the iFrame, just the height; width="100%" or style="width:100%;" is probably sufficient for most use cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions