npr / responsiveiframe

Responsive IFrames

Home Page:http://npr.github.com/responsiveiframe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need responsiveiframe.js to force parent page to scroll to iframe top

tstbastm opened this issue · comments

We are working with a project where responsiveiframe.js is already implemented.

Our issue is that the parent page always scrolls to the top, upon the resized iframe within.

The parent page has a top banner of about 600 pixels height.

We need to scroll down this 600 pixels upon iframe resize, so that the iframe remains in view.

In other words, the resize function should not scroll to the top of the parent page. Instead, we are seeking for the parent page to scroll to the top of the iframe (as if there was an anchor tag, just before the Iframe tag).

Any advice is greatly appreciated.

Cancelled issue when I saw that this was already posted in closed issues.
The solution is to set the scrollToTop: false to true within the parent .js side