Responsive embedded iframe Pym. js

Source: Internet
Author: User

Pym. js allows you to automatically adjust the iframe size when embedding iframe to adapt to the parent container and avoid cross-origin problems.

Supported browsers:

  • Internet Explorer 9, 10 (Windows 7), 11 (Windows 8)

  • Chrome 32 (MACOs 10.9)

  • Firefox 26 (MACOs 10.9)

  • Safari 7 (MACOs 10.9)

  • IOS 7 Safari

  • IOS 7 Chrome

  • Android 4.4 Chrome

Sample Code:

<Div id = "example-1"> </div> <div id = "example-2"> </div> <script type = "text/javascript" src =" pym. js "> </script> <script> var pymParent = new pym. parent ('example-1 ', 'child-1.html', {}); var second = new pym. parent ('example-2 ', 'child-2.html', {}); </script>

Address: http://www.oschina.net/p/pymjs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.