1

Thanks in advance for your help.

Let me preface this by saying that I am mainly an HTML/CSS guy so please try and be as clear as possible in your responses to anything requiring javascript implementation.

I have a Vimeo video loading in a modal box on my page at: http://sparkexperience.com/projects/nma/

However, in Safari and IE, on close of the window, the video continues to play.

I had seen another thread similar to this on this site but still can't seem to figure it out: How to stop a Vimeo video with JQuery

I basically copied all of the javascript code out exactly as is from the Vimeo Javascript API playground and still am having no luck (Playground link: http://player.vimeo.com/playground)

Community
  • 1
  • 1
erickpf
  • 11
  • 1
  • 3
  • 1
    The plugin your using doesn't actually remove the Vimeo player from the DOM so its still there and carries on playing, try using a different plugin, I know PrettyPhoto works fine. – 472084 Sep 28 '11 at 16:19
  • Thanks, switching up the plugin fixed the issue. – erickpf Sep 28 '11 at 19:08

1 Answers1

0

copy this script in the footer of your page (default CSS selectors coming with Foundation)

 <script type="text/javascript">
 jQuery(document).ready(function($) {
   $('body').live('click',function(){
    if($('div.reveal-modal-bg').is(':visible')){
        var resourceVideo = $('#myModal iframe').attr('src');
        $('#myModal iframe').attr('src','').attr('src',resourceVideo);
        };
    })
});
</script>