It’s an epic problem. Youtube videos overlaying my menu drop downs. It drives me crazy!
Vimeo videos seem to be much more professional in their code generation. I didn’t seem to need any code for them.
Well after a week of invaded spartan level of frustration I found a lovely jQuery code that automates modifying iframe youtube videos embed codes. YeAAAhh braaa finely enjoy!
$(document).ready(function() {
$("iframe").each(function(){
var ifr_source = $(this).attr('src');
var wmode = "wmode=transparent";
if(ifr_source.indexOf('?') != -1) {
var getQString = ifr_source.split('?');
var oldString = getQString[1];
var newString = getQString[0];
$(this).attr('src',newString+'?'+wmode+'&'+oldString);
}
else $(this).attr('src',ifr_source+'?'+wmode);
});
});
-
DDB2W
-
Rohit suri
-
Anis 101


