JSFiddle - React, Tailwind, and code Playground

by Castrolol

HTML

<div id='c'>
<iframe width="465" height="285" frameborder="0" allowfullscreen="true" src="http://www.youtube.com/embed/7KS8KGGTpkI?wmode=transparent&amp;vq=hd720"></iframe> 
<p>aksfasjfksalfsfsjkf</p>
<h3>asfasdfasdfasfas</h3>
<iframe width="465" height="285" frameborder="0" allowfullscreen="true" src="http://www.youtube.com/embed/7KS8KGGTpkI?wmode=transparent&amp;vq=hd720" name="test1"></iframe>
</div>

JavaScript

var t = $("#c"); //Getting the container of iframes
var iframesWithoutName = $("iframe",t).not("[name]"); //Getting the iframes without name
$(iframesWithoutName).attr("name", "newName"); //setting the name