dio-v
7/10/2013 - 9:06 AM

fix youtube behind dropdown

fix youtube behind dropdown

$('iframe').each(function () {
    var vT = $(this);
    if (typeof vT.attr('src') != 'undefined'){
        var iSrc = vT.attr('src');
        if (iSrc.indexOf('youtube') >= 0) {
            iSrc = iSrc.replace('wmode=Opaque', 'x=x');
            if (iSrc.indexOf('?') >= 0) {
                var fixed_src = iSrc + '&wmode=transparent';
                vT.attr('src', fixed_src);
            } else {
                var fixed_src = iSrc + '?wmode=transparent';
                vT.attr('src', fixed_src);
            }
        }
    }
});