Created
December 15, 2015 13:19
-
-
Save omariosouto/d2849d76d370088a3101 to your computer and use it in GitHub Desktop.
Image Pré Video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Video Model: Desktop --> | |
<div class="video-full"> | |
<div class="video-fechado" data-rel="V5vY6XXmo_8"> | |
<div class="video"> | |
<span class="imgPreVideo"> | |
<img width="750" height="464" src="http://img.youtube.com/vi/V5vY6XXmo_8/maxresdefault.jpg" class="img-responsive colorbox-55 wp-post-image" alt="Cursos"> <i class="play uf-videos-portal"></i> | |
<span class="clearfix"></span> | |
</span> | |
<div class="embed-responsive embed-responsive-16by9"></div> | |
</div> | |
</div> | |
</div> | |
<!--\Video Model: Desktop--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.video-full .video-fechado:not(.desconsiderar)').click(function() { | |
var v_code = $(this).attr('data-rel'); | |
if ($(this).hasClass('video-fechado')) { | |
$(this).find('div.video div').addClass('video-rodando').append('<iframe class="embed-responsive-item" width="498" height="309" src="https://www.youtube.com/embed/' + v_code + '?vq=hd1080&autoplay=1&rel=0" frameborder="0" allowfullscreen></iframe>'); | |
$(this).find('div.video span').hide(); | |
$(this).find('div.video a.botaoVideo').addClass('invisivel'); | |
} else { | |
$('.video-full .video-fechado').find('div.video div').empty(); | |
$('.video-full .video-fechado').find('div.video span').show(); | |
$('.video-full .video-fechado').find('div.video a.botaoVideo').removeClass('invisivel'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-full { | |
.video { | |
background: #000; | |
.imgPreVideo { | |
position: absolute; | |
padding: 0 15px 0 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment