Return to Snippet

Revision: 52516
at October 25, 2011 19:54 by kiroweb


Initial Code
$(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);
    });
});

Initial URL
http://maxmorgandesign.com/fix_youtube_iframe_overlay_and_z_index_issues/

Initial Description
fix youtube iframe overlay

Initial Title
Fix YouTube iFrame Overlay and Z-Index Issues

Initial Tags
jquery

Initial Language
jQuery