iframe sizing | XM Community
Skip to main content
Solved

iframe sizing

  • October 3, 2018
  • 2 replies
  • 180 views

JenF
Level 2 ●●
Forum|alt.badge.img+9
Need some quick help from you coders out there. I have a form on our website that is on the page using an iframe. The sizing isn't working properly on certain size phones. I was give the following code to make it respond, but it isn't working. Any ideas? <script> function resizeIframe() { var height = $('.embed-iframe iframe').contents().height(); $('.embed-iframe iframe').height(height); } $(window).bind("load", function() { resizeIframe(); }); $(window).resize(function() { resizeIframe(); } ); </script>

Best answer by Ritz

@JenF , Follow this page

2 replies

Ritz
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • Answer
  • October 3, 2018
@JenF , Follow this page

JenF
Level 2 ●●
Forum|alt.badge.img+9
  • Author
  • Level 2 ●●
  • October 5, 2018
> @Ritz said: > @JenF , Follow this page Thank you - I will take a look and see if we can get it to work!