-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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:
- http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content
- http://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it
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.