diff --git a/assets/js/jquery.fitvids.js b/assets/js/jquery.fitvids.js index 0b4680e..edf1d7f 100644 --- a/assets/js/jquery.fitvids.js +++ b/assets/js/jquery.fitvids.js @@ -1,10 +1,12 @@ /*jshint browser:true */ /*! -* FitVids 1.1 +* FitVids 1.3 * -* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com +* +* Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation +* This is an unofficial release, ported by John O'Nolan * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ -* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ +* Released under the MIT license * */ @@ -21,7 +23,7 @@ if(!document.getElementById('fit-vids-style')) { // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js var head = document.head || document.getElementsByTagName('head')[0]; - var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; + var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; var div = document.createElement("div"); div.innerHTML = '

x

'; head.appendChild(div.childNodes[1]); @@ -74,7 +76,7 @@ $this.attr('name', videoName); $.fn.fitVids._count++; } - $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); + $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); $this.removeAttr('height').removeAttr('width'); }); });