Pause Vimeo universal embed when hidden using jQuery

Spread the love

Question Description

I have a Vimeo video (via universal embed iframe) hidden on my page. Clicking a link fades it in, and clicking outside of the video (lightbox-style) fades it out and hides it – but the video keeps playing. I read on Vimeo’s API that you can use JSON objects to pause the video, but I don’t understand what they’re saying.



$('#underlay').click(function() {
    //pause VISIBLE (there are multiple) Vimeo video via API
    $('.vim, #underlay').fadeOut(400);

Practice As Follows

You need to add from one of the froogaloop libraries.


player=$f(document.getElementById('tide'));// you can use jquery too: $('#tide')[0] 

Annoyingly simple. Here’s an example on

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.