Javascript JQuery - Responsive Vimeo Embed

ivaniannoli / 2015-01-21 00:51:11   

Hello!

I'm trying to follow the advice found on this page (css-tricks.com/NetMag/FluidWidthVideo/…) to make my embedded Vimeo vid responsive (like the rest of my site).

Not sure where I would add that snippet. Can you tell me where this should go?

The page with Vimeo: ivaniannoli.com/projects/peter-tork-2015/

ivaniannoli / 2015-02-04 06:42:13   

Is it possible to add this jquery javascript to my site?

$(function() {

var $allVideos = $("iframe[src^='player.vimeo.com'], iframe[src^='youtube.com'], object, embed"),
$fluidEl = $("figure");
         
    $allVideos.each(function() {
    
     $(this)
     // jQuery .data does not work on object/embed elements
     .attr('data-aspectRatio', this.height / this.width)
     .removeAttr('height')
     .removeAttr('width');
    
    });
    
    $(window).resize(function() {
    
     var newWidth = $fluidEl.width();
     $allVideos.each(function() {
    
     var $el = $(this);
     $el
     .width(newWidth)
     .height(newWidth * $el.attr('data-aspectRatio'));
    
     });
    
    }).resize();

});

ivaniannoli / 2015-02-12 05:01:11   

Anybody?

ivaniannoli / 2015-02-20 07:09:53   

Would it help if I mentioned that I'd purchased the new version immediately when it was released (just don't use it), and donated money to indexhibit support a few times over the years?

ivaniannoli / 2015-04-17 05:59:25   

Not sure what's become more outdated, indexhibit or the forum that supports it

tomozei / 2015-05-19 22:16:07   

Hello!
I don't think i can help you with your issue but i did check out you website and i think you have done a great job especially with the responsive version. That's a breakthrough to the 0.7 version.
Would you be kind enough to share some information?
Thank you!

This thread has been closed, thank you.