1/** 2 * Title: Video JS 3 * 4 * Description: Adds class to video iframe to make it responsive. 5 * 6 * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications 7 * should be made in a child theme. 8 * 9 * @category CyberChimps Framework 10 * @package Framework 11 * @since 1.0 12 * @author CyberChimps 13 * @license http://www.opensource.org/licenses/gpl-license.php GPL v3.0 (or later) 14 * @link http://www.cyberchimps.com/ 15 */ 16 17// Add class to video iframe 18jQuery(document).ready(function ($) { 19 jQuery("iframe[src^='http://www.youtube.com']").wrap("<div class='flex-video' />"); 20 jQuery("iframe[src^='//www.youtube.com']").wrap("<div class='flex-video' />"); 21 jQuery("iframe[src^='https://www.youtube.com']").wrap("<div class='flex-video' />"); 22 jQuery("iframe[src^='http://player.vimeo.com']").wrap("<div class='flex-video' />"); 23 jQuery("iframe[src^='//player.vimeo.com']").wrap("<div class='flex-video' />"); 24 jQuery("iframe[src^='https://player.vimeo.com']").wrap("<div class='flex-video' />"); 25 jQuery(".wp-video").wrap("<div class='flex-video' />"); 26 jQuery("embed[type^='application/x-shockwave-flash']").wrap("<div class='flex-video' />"); 27}); 28