Flexible Video Demonstration

Stay Flexible even if your an iFrame

Resize with jQuery

The JavaScript solution written by Chris Coyier allows you to just copy-and-paste YouTube embed code onto your page and it's done. His solution allows any aspect ration of the source video and works on all videos embedded using an iFrame. Below are some examples.


  • Link to the latest google jQuery library
  • Link to the fitvids javascript library
  • Find a YouTube video or a Vimeo video and copy the iframe embed code
  • Paste the code into your webpage
  • Add the script to the bottom of your page and change the containing element




Non arcu lectus porta nunc mid! Vel elementum ac cursus in placerat hac? Odio porttitor dolor dapibus mid, magna magna tincidunt porta tempor in, turpis montes urna mauris ridiculus egestas eu porttitor, est massa ac, a et mid quis placerat? Dictumst integer ut sagittis egestas et, arcu vel ridiculus enim, nisi porta porta est odio sociis ultricies pulvinar scelerisque nunc pulvinar elementum. Vel sagittis amet, porttitor, ut lacus a nunc lectus tincidunt placerat et integer pid penatibus!