As the title says - I have a YouTube modal pop up window auto play my video when a button is pressed. What I have works in webflow when I publish and preview, but now that I have exported and published on my own server the function no longer works (play or stop). I simply copied and pasted the files onto the server no rearranging.
I used this as guide as my starting point: http://forum.webflow.com/t/how-to-create-video-modal-pop-up/3481/14
Here is my modified code right before the /body tag
<script type="text/javascript">
$(document).ready(function() {
$('#playVideoBtn').click(function(e) {
e.preventDefault();
$('.modal-background.video').fadeIn();
player.playVideo();
});
$('#close-video').click(function(e) {
e.preventDefault();
$('.videoplayer').children('iframe').attr('src', '');
$('.modal-background.video').fadeOut();
player.stopVideo();
});
$('.modal-background-link').click(function(e) {
e.preventDefault();
$('.videoplayer').children('iframe').attr('src', '');
$('.modal-background.video').fadeOut();
player.stopVideo();
});
});
Help is hugely appreciated! I’m stumped.
Thanks!