Fix YouTube iFrame Overlay and Z-Index Issues

    fix youtube iframe overlay
    [javascript]
    $(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);
    });
    });
    [/javascript]
    Snippet : Source

    Tags:

    One Reply to Fix YouTube iFrame Overlay and Z-Index Issues

    1. Hostgrafia says:

      Thanks Good for creating genius like one who made this script. Last moment of hope… Thank You Very Much Indeed…

      ps. var wmode = “wmode=transparent”; – > var wmode = “wmode=opaque”;

    Leave a Reply