Vimeo-omeka-module/asset/js/media_dimensions.js

16 lines
348 B
JavaScript

function adjust_vimeo_height() {
$(".embeded-vimeo-wrapper").each(function() {
var iframe = $(this).find('iframe')
var height = $(iframe).width() / $(iframe).attr('ratio')
$(iframe).prop("height", height)
});
}
jQuery(document).ready(function() {
adjust_vimeo_height();
});
$(window).resize(function() {
adjust_vimeo_height();
});