Defer parsing of JavaScript not working
<p>Gtmetrix says there are some JS files coming from youtube which need to be deferred. I removed iframe and deferred it using jQuery and also through classic Javascript code but both methods are not working. Gtmetrix still displays same youtube JS files.</p>

<p>The error in Gtmetrix
<a href="https://i.stack.imgur.com/NZZ5r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NZZ5r.png" alt="enter image description here"></a>
Here is the Javascript code I am currently using</p>

<pre><code>&lt;script&gt;
var txt = '&lt;iframe src="https://www.youtube.com/embed/qwertyuiopa?feature=oembed&amp;amp;wmode=opaque" allowfullscreen="" frameborder="0"&gt;&lt;/iframe&gt;';
document.getElementsByClassName('myclass')[0].innerHTML = txt;
&lt;/script&gt;
</code></pre>

<p>PS: Yes I removed cache and there is no <code>&lt;iframe&gt;</code> tag in source code and that JS code is working well as it should.</p>