title: Restart Vimeo iFrame with Froogaloop JavaScript and jQuery
body: <p>My page dynamically launches one of several Vimeo iFrame embedded videos and I'm using jQuery to fade them in/out and start/stop. Right now, my close function hides the video and subsequently pauses it. If you bring up the same video after its been hidden it begins from where it was paused the time before. I'd like it to restart. I can't figure out just the right action. Some how "stop" and "restart" aren't options (how illogical is that? play/pause/stop).</p>
  
  <p>I'm linking to Vimeo's hosted version of Froogaloop JS and using jQuery to call the functions.</p>
  
  <p>Thanks!</p>
  
  <p>JavaScript:</p>
  
  <pre><code>$('#close, #underlay').click(function() {
      $('.vim, #close, #container, #underlay').fadeOut(400);
      var player=$f($('.vid:visible')[0]);
      player.api('pause');
  });
  </code></pre>