Commit 7ba5effd authored by Bruno Antunes Magrini's avatar Bruno Antunes Magrini

Change way to select iframe in featured video widget. Allows it to be used...

Change way to select iframe in featured video widget. Allows it to be used more than once in same page.
parent b5b9b0c4
(function($){
$(function(){
var url = 'https://www.youtube.com/embed/';
$iframe = $('.js-featured-videos--iframe');
var $thumbs = $('.js-featured-videos--thumbnail');
$thumbs.on('click', function(e){
e.preventDefault();
$iframe = $(this).parents().parents().siblings().children('.js-featured-videos--iframe');
$iframe.attr('src', url + $(this).data('videoId')+'?autoplay=1');
$thumbs.removeClass('active');
$(this).addClass('active');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment