Created
November 20, 2019 15:58
-
-
Save cgi-caesar/4f5a146549c425d5f232ee3081b3ab4a to your computer and use it in GitHub Desktop.
aMember (site.js): responsive iframe (maintain aspect ratio)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
jQuery(window).resize(function(){ | |
jQuery('iframe.embed-video-16-9').each(function(){ | |
jQuery(this).height(jQuery(this).width() * 9/16) | |
}); | |
}).resize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment