Embed Rise - dynamically adjust iframe height to content height

If I embed a Rise course in an iframe, it results in giving me two scrollbars - one in the iframe, the other in the browser-window.

So, to make it look nice, I would like to adjust the height of the iframe to the height of the Rise course. I could then get rid of the iframe's scrollbar.

Also, it would have to adjust the iframe's height dynamically as the height of the rise course changes.

Has anyone done this before and can share the JS? I was trying different approaches, but my JS skills are limited :-)

Be the first to reply