You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
443 B

$( window ).resize(function() {
reload_video_size()
});
$(function(){
reload_video_size()
});
function reload_video_size(){
var fr = $('iframe');
var w = parseInt(fr.attr('width'), 10);
var h = parseInt(fr.attr('height'), 10);
var w_par = fr.parent().width();
var w_per = w/100;
var h_per = h/100;
var diff = (w_par/w_per) - 100;
fr.attr('width', w + diff*w_per);
fr.attr('height', h + diff*h_per);
}