How can I modify the URL of an iframe, if it contains the youtube.com text?
I want to append:
&wmode=Opaque
to it, but only if this argument doesn't already exist;
Tried:
$('iframe[src*=youtube.com]').attr('src',
$(this).attr('src') + '&wmode=Opaque');`
but I get an error:
Uncaught Error: Syntax error, unrecognized expression: [src*=youtube.com]
ok, I found out:
$('iframe[src*="youtube.com"]').each(function(){
this.src += '&wmode=Opaque';
});
src*='youtube.com'.