Skip to content

Instantly share code, notes, and snippets.

@chrissmithps
Created February 5, 2020 13:50
Show Gist options
  • Select an option

  • Save chrissmithps/b4488665dcd5b2bf1dcd00adf3532fd4 to your computer and use it in GitHub Desktop.

Select an option

Save chrissmithps/b4488665dcd5b2bf1dcd00adf3532fd4 to your computer and use it in GitHub Desktop.
Code removed from Event Dancers
<div id='mobile-video'>
<a class='btn' href='#'>Show Video</a>
<div class='videos'></div>
</div>
<script type='text/javascript'>
jQuery(document).ready(function($) {
$('.rs-background-video-layer').each(function() {
$('#mobile-video').addClass('visible');
$('#mobile-video .videos').append('<iframe src="https://www.youtube.com/embed/_fyzXtp1QGw" allow="autoplay; encrypted-media" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>');
});
$('#mobile-video .btn').click(function() {
$('#mobile-video .videos').slideToggle();
$(this).text($(this).text() == 'Show Video' ? 'Hide Video' : 'Show Video');
return false;
});
});
</script>
<style type='text/css' scoped>
#mobile-video, #mobile-video .videos {
display: none;
}
#mobile-video .btn {
width: 94%;
display: block;
border: 2px solid #dba628;
color: #dba628;
text-align: center;
padding: 5px 0;
margin: 2%;
text-decoration: none;
font-weight: bold;
}
@media screen and (max-width: 680px) {
#mobile-video.visible, #mobile-video .visible {
display: block;
}
#mobile-video iframe {
border: 0;
width: 100vw;
height: 55vw;
}
}
</style>
<?php putRevSlider('testimonials'); ?> <!-- this is to go on home page Laura knows where to go, I took it out while trying to fix the other issue -->
Argument <!-- I removed this argument from Rev Slider as well --> hd=1&wmode=opaque&showinfo=0&rel=0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment