Código HTML:
$('iframe~*').remove(); $('iframe').attr('width', '100%').attr('height', $('iframe').width()/16*9).each(function(){ var url = $(this).attr("src"); var char = "?"; if(url.indexOf("?") != -1){ var char = "&"; } $(this).attr("src",url+char+"wmode=transparent"); }); $(window).resize(function(e) { $('iframe').attr('width', '100%').attr('height', $('iframe').width()/16*9).each(function(){ var url = $(this).attr("src"); var char = "?"; if(url.indexOf("?") != -1){ var char = "&"; } $(this).attr("src",url+char+"wmode=transparent"); }); });