Scroll top using iframeResizer
See original GitHub issueHello, I currently have an iframe, and I use your javascript:
Example:
<iframe id = "myIframe" src = "https://www.compras.icambio.es/compradivisas.aspx" scrolling = "no"> </ iframe>
On the page that is the URL of the src, I have included the javascript iframeResizer.contentWindow.js
The problem is the following, when I am browsing:
I have a form on the first page, when I sent it the scroll stays in half because the second screen is higher than the first and I want it to go back to the top of the second page.
I have tried to use a jquery to return top of the page when loading:
window.parent. $ ("body"). animate ({scrollTop: 0}, 'slow');
But it’s not working.
I would like that when you load the second page into the iframe, return to position 0 of the top of that page.
I do not know if you can help me, regards.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
iframe-resizer: How to scroll to the top - Stack Overflow
Yes, iframe-Resizer solves this problem. But I still have to learn how to use the scrollTo-Method: github.com/davidjbradshaw/iframe-resizer.
Read more >iFrame Resizer - GitHub Pages
Provides custom sizing and scrolling methods. Exposes parent position and viewport size to the iFrame. Works with ViewerJS to support PDF and ODF...
Read more >Adding Pages to SpaceCraft - FitMetrix - MINDBODY
Click the Content tab. In the Global Content section, click the Footer link. Click the User-added image (HTML) button. Add the iFrameResizer and ......
Read more >iFrame resizer details - apaleo Developer Documentation
It resizes in accordance with the height of your application. In other words, the library allows apaleo to handle the scrollbars for you....
Read more >Iframe Resizer - JavaScripting.com
Keep same and cross domain iFrames sized to their content with support for window/content resizing, nesting and multiple iFrames. (Dependency free,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updated links
https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/iframed_page/methods.md#scrolltooffsetxy
And
https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/parent_page/events.md#onscroll
Hi guys, can someone help me out here. I read this documentation but I still don’t get it to scroll to the top if the user clicked a link inside the iframe. I do not have access to the content inside the iframe. I try to scroll to the top always when the user clicks something. I would be happy if somebody can help me with this code. thx