From ffaece342f5e5e299d4dcb7dcf4d739cc30c4741 Mon Sep 17 00:00:00 2001 From: Conor Barclay Date: Mon, 19 Dec 2016 23:10:15 -0800 Subject: [PATCH] Remove to-be deprecated classes from flex-video example "flex-video" classes will be deprecated in favour of the "responsive-embed" class. Also -- there is no longer any Vimeo-specific class within F6. Something like the proposed would be a more future-proof starting point for responsive videos. --- assets/javascript/custom/flex-video.js | 2 -- assets/javascript/custom/responsive-video.js | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 assets/javascript/custom/flex-video.js create mode 100644 assets/javascript/custom/responsive-video.js diff --git a/assets/javascript/custom/flex-video.js b/assets/javascript/custom/flex-video.js deleted file mode 100644 index 8e91b213d..000000000 --- a/assets/javascript/custom/flex-video.js +++ /dev/null @@ -1,2 +0,0 @@ -jQuery( 'iframe[src*="youtube.com"]').wrap("
"); -jQuery( 'iframe[src*="vimeo.com"]').wrap("
"); diff --git a/assets/javascript/custom/responsive-video.js b/assets/javascript/custom/responsive-video.js new file mode 100644 index 000000000..144a2add0 --- /dev/null +++ b/assets/javascript/custom/responsive-video.js @@ -0,0 +1,8 @@ +$(document).ready(function () { + var videos = $('iframe[src*="vimeo.com"], iframe[src*="youtube.com"]'); + + videos.each(function () { + var el = $(this); + el.wrap('
'); + }); +});